If $u_1=1$ and $u_{n+1} = n+\sum_{k=1}^n u_k^2$, then $u_n$ is never a square.

The recurrence can be rewritten as \begin{eqnarray*} u_{n+1}=u_n^2+u_n+1. \end{eqnarray*} It is easy to show that \begin{eqnarray*} u_n^2 < u_{n+1} <(u_n+1)^2. \end{eqnarray*} Now observe that there is no whole numbers between $u_n$ & $u_n+1$.


The problem, indeed, is very cute.

We just need to check the condition $\textrm{mod } 5$: $$u_1 \equiv 1 \textrm{ mod } 5$$ $$u_2 \equiv 2 \textrm{ mod } 5$$ $$u_3 \equiv 2 \textrm{ mod } 5$$ etc.

Therefore, one can show by induction that for any $n \in \mathbb{N}$: $$u_{n+1} \equiv \left[ n+1+\sum_{j=2}^n (-1) \right] \textrm{ mod } 5 \equiv 2 \textrm{ mod } 5.$$ The latter is never true for squares, since squares are equal to either 0,1 or 4 mod 5.

To prove the generalization, we use the recurrence relation of type $$u_{n+1} = u_n^2+u_n+a.$$ Notice that $u_{n+1}>u_n^2$ since $a>0$.

Therefore, if $u_{n+1}$ is a perfect square, then $a\geq u_n+1 > u_n$.

But $a>u_n$ is impossible since for any $n \geq 3$: $$u_{n} = u_{n-1}^2+u_{n-1}+a >a.$$ This gives us a contradiction, so $u_n$ is never a perfect square for any $n\geq 3$.