Sum of two squares representation

1.2k Views Asked by At

I found the following condition: A positive integer $n$ is re-presentable as the sum of two squares, $n=x^2+y^2$ if and only if every prime divisor $p≡3$ mod $4$ of $n$ occurs with even exponent.

And $p$ is re-presentable as sum of $2$ squares only when $p≡1$ mod $4$, where $p$ is a prime.

$36=2^23^2$, here power of $3$ is $2$. Then how come $36$ cannot be represented as sum of $2$ squares, except the trivial case $6^2+0^2$?

What is the sufficient condition for $2$-square representation (not the trivial one) for any $n$?

2

There are 2 best solutions below

4
On BEST ANSWER

If a square is divisible by a prime $p$ with $p \equiv 1 \pmod 4,$ then it can also be written as two nonzero squares added. Begin with the Pythagorean triple $(u,v, p^2)$ and then multiply throughout by the remaining factor of your original square.

so, say your square is $25 w^2.$ Note $3^2 + 4^2 = 25.$ Then $(3w)^2 + (4w)^2 = 25 w^2$

From comments: given some $n^2,$ where the only prime factors of $n$ are either $2$ or $q \equiv 3 \pmod 4,$ then we cannot express $n^2 = s^2 + t^2$ with both $s,t \neq 0$ integers.

0
On

The set of sums of two squares is closed by multiplication via the formula $$(a^2+b^2)(c^2+d^2)=(ac+bd)^2+(ad-bc)^2$$ Here, since $2=1+1$ you have $36=3^2(1+1)(1+1)=3^2[(1+1)^2+(1-1)^2]$ hence the only representation is the trivial one $$36^2= 36^2+0^2$$

There are cases in which this representation is not unique.