2

For instance $z=50$ has two solutions: $(x,y)=(1,7)$ and $(x,y)=(5,5)$. $z=125$ has two solutions $(x,y)=(10,5)$ and $(x,y)=(11,2)$. Just fumbling around, I have not found any $z$ that has 3 or more solutions. Is there a systematic way to generate solutions?

I have since made a C program to check every number between 1000 and 10000 and found about 10% decompose into 2 squares,quite a few that decompose into 3 squares, a lesser amount into 4 and even a couple that are the sum of 5 squares.

  • If you include negative $x$ and $y$, you might get many more solutions. – Andrew Mar 14 '17 at 19:14
  • 1
    To the downvoter: just because the OP didn't format his question using MathJax doesn't mean it's a bad question. –  Mar 14 '17 at 19:15
  • 4
    $325=10^2+15^2=1^2+18^2=6^2+17^2$. this article describes ways to produce examples. – lulu Mar 14 '17 at 19:21
  • http://math.stackexchange.com/questions/2069687/representation-of-a-number-as-a-sum-of-squares/2070383#2070383 – individ Mar 15 '17 at 12:23
  • When you say "decompose into $3$ squares" I think you mean "decompose into $2$ squares in $3$ different ways". The present expression sounds more like writing $z = x^2 + y^2 + w^2$. – Erick Wong Mar 15 '17 at 18:25

3 Answers3

3

Yes, for example:

\begin{align} 71825&=1^2+268^2\\ &=40^2+265^2\\ &=65^2+260^2\\ &=76^2+257^2\\ &=104^2+247^2\\ &=127^2+236^2\\ &=160^2+215^2\\ &=169^2+208^2\\ &=188^2+191^2 \end{align}

However the counterexample mentioned by @lulu is the smallest counterexample; $$325=10^2+15^2=1^2+18^2=6^2+17^2$$


We can produce infinitely many of them by setting $p,q$ primes both $1\mod 4$, then $p^2q$ has $3$ distinct ways to write as sum of two squares. For example, $p=13$ and $q=29$, then $p^2q=4901$ has three ways to write as sum of three squares, and indeed, $$4901=70^2+1^2=26^2+65^2=49^2+50^2$$

mathworld.wolfram has an excellent page about this subject (linked by @lulu).

1

Using methods of analytic number theory one can compute $r_2(n)$, the number of different ways to represent $n$ as the sum of two squares. We have $$ r_2(n) = 4\sum_{d=1,3,...|n}(-1)^{(d-1)/2} = 4\sum_{d|n}\sin\left(\frac{1}{2}\pi d\right), $$ see here. Clearly $r_2(n)\ge 3$ for $n$ chosen accordingly in the first sum.

Dietrich Burde
  • 130,978
1

My example was gotten by multiplying out $(1+2i)(2\pm3i)(1\pm i)$ to get $5\cdot13\cdot17=1105=32^2+9^2=4^2+33^2=31^2+12^2=24^2+23^2$.

Lubin
  • 62,818