When is a sum of consecutive squares equal to a square? We have the sum of squares of $n$ consecutive positive integers: $$S=(a+1)^2+(a+2)^2+ ... +(a+n)^2$$ Problem was to find the smallest $n$ such, that $S=b^2$ will be square of some positive integer. I found an example for $n=11$. Now, I'm trying to prove, that if $2&lt;n&lt;11$ there is't any solution. So I need some help with this: If $n,a,b \in \mathbb{N}$ and $n&lt;11$ prove that equation

$$
n\cdot a^2 + n(n+1)\cdot a + \frac{1}{6}n(n+1)(2n+1)=b^2
$$

can't be solved. Or if I'm wrong, find counterexample.

The only idea I have is: to consider the remains $\operatorname{Mod}[b^2,n]$ and $\operatorname{Mod}[\frac{1}{6}n(n+1)(2n+1),n]$. For each $2&lt;n&lt;11$, but it is very long.
Below is a reasonable (but not very illuminating) proof. Put $S_n(x)=\sum_{k=1}^{n} (x+k)^2$. Note that it is also true that for $2&lt;n&lt;11$, $S_n(x)$ is never a square modulo $n^2$, and $S_n(x)$ is also never a square modulo $900$. Perhaps this will inspire others to produce more intelligent proofs.

Here it goes :

$$
\begin{array}{ccll}
S_3(x) &amp; \equiv &amp; 3x^2+12x+14 \equiv 2 &amp; {\sf mod} \  3 \\
S_4(x) &amp; \equiv &amp; 4x^2+20x+30 \equiv 2 &amp; {\sf mod} \  4 \\
S_5(x) &amp; \equiv &amp; 5x^2+30x+55 \equiv 2 \ \text{or} \ 3 &amp; {\sf mod} \  4 \\
S_6(x) &amp; \equiv &amp; 6x^2+42x+91 \equiv 3 &amp; {\sf mod} \  4 \\
S_7(x) &amp; \equiv &amp; 7x^2+56x+140 \equiv 3,8,11 \ \text{or} \ 12 &amp; {\sf mod} \  16 \\
S_8(x) &amp; \equiv &amp; 8x^2+72x+204 \equiv 2,5,6 \ \text{or} \ 8 &amp; {\sf mod} \  9 \\
S_9(x) &amp; \equiv &amp; 9x^2+90x+285 \equiv 6 &amp; {\sf mod} \  9 \\
S_{10}(x) &amp; \equiv &amp; 10x^2+110x+385 \equiv 5,10 \ \text{or} \ 20&amp; {\sf mod} \ 25  \\
\end{array}
$$

Each time, we see that $S_n(x)$ is never a square for the given modulus.
There is a solution for n=2, namely:
n=2; a=2,b=5. 
since 3 squared + 4 squared = 5 squared, 
proof: 9+16=25.
However I noticed n=2 was excluded in the equality stating n less than 11. It is not clear to me why n=2 is excluded.