Pell's type equation in sum I have an another observation on concatenation in sum. For instance, take $12^2 + 33^2 = 1233$. Find as many such pairs (x, y) with $x^2 + y^2 = xy\,$(here xy is concatenation)is possible. Also, discuss how this is happening and is there any connection between this kind of problem and pell's equations?
I got $10^2 + 1^2 = 101$;
$0^2 + 1^2 = 01$;
$88^2 + 33^2 = 8833$;
$12^2 + 33^2 = 1233$;
such pairs.
 A: This is equivalent to $x^2 + y^2 = 10^n x + y$ with size constraints on $y$ (preferably $10^{n-1} \le y < 10^n$, though we will shortly see that the right-hand inequality is superfluous).
Completing the square gives $(2x - 10^n)^2 + (2y - 1)^2 = 10^{2n} + 1$, so we are looking for a way to write $10^{2n}+1$ as the sum of two squares $A^2+B^2$, where $A = 2x-10^n$ is even and $B=2y-1$ is odd.  Since clearly $B \le 10^n$, we needn't worry about $y$ being too large, but we'd like $B \ge \tfrac15\cdot10^n - 1$ so that $y$ doesn't need to be zero-padded before concatenation (otherwise we could use the trivial solution $A=10^n$, $B=1$ giving $x=10^n$, $y=1$).
A simple way to construct solutions is to choose $n$ in certain congruence classes so that $10^{2n}+1$ has a particular prime factor that yields a non-trivial decomposition as the sum of two squares.  For instance if $n = 16k+12$ we have $10^n \equiv -4 \pmod{17}$ and $17 \mid 10^{2n}+1$, which gives the decomposition
$$10^{2n}+1 = [\tfrac1{17}(15\cdot 10^{n}-8)]^2 + [\tfrac1{17}(8\cdot 10^n +15 )]^2.$$
Here, $B = \tfrac1{17}(8\cdot 10^n + 15)$ so we may take $y = \tfrac4{17}(10^n+4)$.  Similarly, $x = \tfrac4{17}(4\cdot 10^n-1)$.  Taking $k=0$ this gives
$$ \color{red}{941176470588}^2 + \color{blue}{235294117648}^2 = \color{red}{941176470588}\color{blue}{235294117648}.$$
I don't see a strong connection to Pell equations but it certainly is possible when working with conics like these.
