Writing an integer as a sum of two square in many ways, with consecutive arguments Let $n\in{\mathbb N}$. I call $n=x_1^2+y_1^2=x_2^2+y_2^2=\ldots x_r^2+y_r^2$
(where $(x_1,y_1),(x_2,y_2),\ldots,(x_r,y_r)$ are distinct uples
in ${\mathbb N}^2$) a multi-decomposition of $n$, of length $r$. If the
$x_1,x_2,\ldots,x_r$ form an arithmetic progression of step $1$, I say
that the multi-decomposition is connected.
For example, 
$$
1105=\left\lbrace\begin{array}{lcl}
31^2 &+& 12^2 \\
32^2 &+& 9^2 \\
33^2 &+& 4^2 \\
\end{array}\right.
$$
is a connected multi-decomposition (CMD in abbreviated notation) of length three
for $n=1105$.
With the help of my computer, I found out that for $n\leq 10^6$ there is
no CMD of length four, and the $n$'s having CMD of length three are exactly
the following : $$25, 1105, 12025, 21025, 66625, 252601, 292825, 751825.$$
My questions are :


*

*Are there CMD's with length larger than three ?

*Is there a simple description of all $n$'s having a CMD of length three ?

 A: If $n=x^2+y^2$ holds for some $n,x,y\in\Bbb{N}$, then $n\not\equiv3\pmod4$ as squares are congruent to either $0$ or $1$ modulo $4$. First note that for a nontrivial CMD we must have $n\equiv1\pmod4$:

*

*If $n\equiv0\pmod4$ then we must have $x\equiv y\equiv0\pmod{2}$,
so there cannot be two consecutive $x_1,x_2\in\Bbb{N}$
with $n=x_1^2+y_1^2=x_2^2+y_2^2$.


*If $n\equiv2\pmod4$ then we must have $x\equiv y\equiv1\pmod{2}$,
so there cannot be two consecutive $x_1,x_2\in\Bbb{N}$
with $n=x_1^2+y_1^2=x_2^2+y_2^2$.
Now let $n=x_i^2+y_i^2$ for a CMD $\{(x_i,y_i)\mid\ i\in\{1,2,3,4\}\}$. Then $x_i\not\equiv y_i\pmod2$ for all $i$, and it is not hard to check that for all $i$
$$x_i\equiv0\pmod4\ \Rightarrow\ n\equiv1\pmod8,$$
$$x_i\equiv1\pmod4\ \Rightarrow\ n\equiv1,5\pmod8,$$
$$x_i\equiv2\pmod4\ \Rightarrow\ n\equiv5\pmod8,$$
$$x_i\equiv3\pmod4\ \Rightarrow\ n\equiv1,5\pmod8,$$
where the odd cases $x_i\equiv1,3\pmod4$ depend on whether $y_i\equiv0\pmod4$ or $y\equiv2\pmod4$. As we have four consecutive $x_i$, we have $n\equiv1\pmod8$ and $n\equiv5\pmod8$, a contradiction. So no CMD of length four (or greater) exists.

Perhaps this helps with your other question, on describing the integers $n$ having a CMD of length $3$:
There is a correspondence between integral points on the quadratic surface
$$y^2=2u^2-v^2-2,$$
and length three CMD's. The correspondence is $8$-to-$1$, which comes from the choices of signs for $y$, $u$ and $v$.  I don't exclude that some $n\in\Bbb{N}$ might have multiple length three CMD's.
Given a point $(y,u,v)$ on the surface, which is a two-sheeted hyperboloid, set
$$x:=\tfrac{1}{2}(y^2-u^2-1)=\tfrac{1}{4}(y^2-v^2-4).$$
Then it is a bit cumbersome to check that the pairs
$$\left(|x|,|y|\right),\ \left(|x|+1,|u|\right),\ (|x|+2,|v|),$$
form a CMD of length three. Conversely, given a CMD of length three $(x_1,y_1),\ (x_2,y_2),\ (x_3,y_3)$, it follows from the relations $x_1^2+y_1^2=x_2^2+y_2^2=x_3^2+y_3^2$ that
$$y_1^2-2x_1-1=y_2^2\qquad\text{ and }\qquad y_1^2-4x_1-4=y_3^2.$$
Solving both for $x_1$ and equating them shows that $(y_1,y_2,y_3)$ is an integral point on the curve.
The nice thing about quadratic surfaces is that if they have a rational point, then they have infinitely many rational points. Given an explicit point, all rational points can be parametrized explicitly. You've found the point $(y,u,v)=(4,3,0)$ on the surface. This gives us a parametrization by mapping $(\lambda:\mu:\nu)\in\Bbb{P}_{\Bbb{Q}}^2$ to
$$\left(4+4\frac{3\mu-2\lambda}{\lambda^2-2\mu^2-\nu^2}\lambda,3+4\frac{3\mu-2\lambda}{\lambda^2-2\mu^2-\nu^2}\mu,4\frac{3\mu-2\lambda}{\lambda^2-2\mu^2-\nu^2}\nu\right),$$
which is undefined only at the points $(3:2:\pm1)\in\Bbb{P}_{\Bbb{Q}}^1$. Then it remains to determine the integral points in this parametrization. We may take $\lambda,\mu,\nu\in\Bbb{Z}$ with $\gcd(\lambda,\mu,\nu)=1$. Then the integral points are the points for which
$$\lambda^2-2\mu^2-\nu^2\mid4(3\mu-2\lambda).$$
A: Although the answer is not quite on the topic.
$$x_1^2+y_1^2=x_2^2+y_2^2=x_3^2+y_3^2=x_4^2+y_4^2$$
For the equation is possible to write General standard formula - moreover it is symmetric.  Interestingly, so monjo to record for any number of summands.
$$x_1=(a^2+b^2)(t^2+k^2)(n^2+q^2)p$$
$$y_1=(a^2+b^2)(t^2+k^2)(n^2+q^2)s$$
$$x_2=(a^2+b^2)(n^2+q^2)(2tkp-(t^2-k^2)s)$$
$$y_2=(a^2+b^2)(n^2+q^2)((t^2-k^2)p+2tks)$$
$$x_3=(a^2+b^2)(t^2+k^2)(2nqp-(n^2-q^2)s)$$
$$y_3=(a^2+b^2)(t^2+k^2)((n^2-q^2)p+2nqs)$$
$$x_4=(t^2+k^2)(n^2+q^2)(2abp-(a^2-b^2)s)$$
$$y_4=(t^2+k^2)(n^2+q^2)((a^2-b^2)p+2abs)$$
