When is the sum of consecutive squares a prime? For what integers $x$ do there exist $x$ consecutives integers, the sum of whose squares is prime?
I tried use $$1^2+2^2+...+n^2=\frac {n(n+1)(2n+1)}{6}$$

The sum of the squares of the first $x$ consecutive integers, starting from $n+1$, equals
$$(n+1)^2+(n+2)^2+\ldots+(n+x)^2=\frac{(n+x)(n+x+1)(2(n+x)+1)}{6}-\frac{n(n+1)(2n+1)}{6}$$ $$=\frac{1}{6}\cdot x\cdot(6n^2+6nx+2x^2+6n+3x+1).$$
For this to be prime we must have $x\mid 6$ or 
$$6n^2+6nx+2x^2+6n+3x+1\mid6.$$
Solving the quadratic equation
$$6n^2+6nx+2x^2+6n+3x+1=c,$$
for $n$ where $c\mid 6$ yields the solutions
$$n=-\frac{1}{2}(x+1)\pm\frac{1}{2}\sqrt{3+6c-3x^2},$$
which shows that $c\geq-\tfrac{1}{2}$ and $x\leq\sqrt{1+2c}$, which reduces to $c\in\{2,3,6\}$ and $x\in\{2,3\}$ as $x=1$ is impossible. The only values that yield integral solutions for $n$ are $c=3$ and $x=2$, with solutions $n=0$ and $n=3$ corresponding to the sums of squares
$$1^2+2^2=5\qquad\text{ and }\qquad 4^2+5^2=41.$$
Otherwise $x\mid 6$. For $x=2$, $x=3$ and $x=6$ we may take $n=1$ to find
$$2^2+3^2=13,\qquad 2^2+3^2+4^2=29,\qquad 2^2+3^2+4^2+5^2+6^2+7^2=139,$$
which are all prime, and $x=1$ is still impossible. Hence the values of $x$ for which there exists $x$ consecutive integers, the sum of whose squares is prime, are $2$, $3$ and $6$.
