# Does there exist a sum of two squares which is written in MORE than 4 distinct way? [closed]

This follows from "Enumerating ways to decompose an integer into the sum of two squares" , and my investigation on the 3x3 magic square of squares problem. In addition to following "Fermat's theorem on the sum of two squares," does there exist a sum of two squared numbers which can be written in more than 4 distinct ways; under the assumption that they are positive integers?

## closed as off-topic by Benjamin Dickman, Franz Lemmermeyer, Olivier, Dima Pasechnik, Marco GollaMar 1 '16 at 7:55

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question does not appear to be about research level mathematics within the scope defined in the help center." – Benjamin Dickman, Franz Lemmermeyer, Olivier, Dima Pasechnik, Marco Golla
If this question can be reworded to fit the rules in the help center, please edit the question.

• Just make $n$ be the product of many primes that are 1 mod 4. – post.as.a.guest Mar 1 '16 at 7:59

Yes, $325$ is the first such integer (with 24 distinct solutions to $x^2+y^2=325$ ... $6$ of which are sums of squares of positive integers).

(The next one is 425).

Note also that $x^2+y^2=1105$ has $32$ solutions, $x^2+y^2=4225$ has $36$ solutions, $x^2+y^2=5525$ has $48$ solutions, $x^2+y^2=27625$ has $64$ solutions etc.

The formula goes as follows : let $n>0$ be an integer. Let $d_1(n)$ be the number of factors $m$ of $n$ such that $m\equiv 1 \text{ mod 4}$ and let $d_{-1}(n)$ be the number of factors $m$ of $n$ such that $m\equiv -1 \text{ mod 4}$.

Then the number of solutions $(x,y)$ to $x^2+y^2=n$ is $4.(d_1(n)-d_{-1}(n))$.

Example : $801125=5^3.13.17.29$ is the smallest number for which there exists 128 distinct solutions.

Edit: If you count $x^2+y^2=n$ and $y^2+x^2=n$ as the same decomposition, then $5525$ is the smallest integer with $6$ distinct decompositions.

• @BenjaminDickman Sorry, I don't understand ... I can see 3 different couples $(a,b)$ with $a<b$ such that $a$ and $b$ are squares (of integers) and $a+b=325$, and $6$ different couples $(a,b)$ such that $a$ and $b$ are squares and $a+b=325$, and 24 different couples $(x,y)$ such that $x$ and $y$ are integers and $x^2+y^2=325$, but nowhere a 7. Can you expand on your comment ? – few_reps Mar 1 '16 at 7:33
• Ah, I was talking about $325^2$, rather than $325$, which you can see described in OEIS A097101. The seven pairs $(x, y)$ for which $x^2 + y^2 = 325^2$ are: $(36, 323), (80, 315), (91, 312), (125, 300), (165, 280), (195, 260), (204, 254)$. (In any event: I've voted to close the question since it is certainly not research level...) – Benjamin Dickman Mar 1 '16 at 7:49
• @BenjaminDickman ok ... (I guess it has been research level at the time of Legendre ...) – few_reps Mar 1 '16 at 8:09
• @SebastianGoette It was a typo (now corrected). – few_reps Mar 1 '16 at 23:57