find the number of integer solutions of n = x^2 + y^2

75 Views Asked by At

Let $p$ be an integer prime of the form $4k+1$ and let $n=p^r$. Find the number of solutions to $x^2+y^2 = n$. The cases $r$ even and $r$ odd will be slightly different.

1

There are 1 best solutions below

1
On BEST ANSWER

There exists some $z\in\Bbb Z[i]$ such that $p=z\bar z$. Then $p^r=z^r\bar z^r=z^j\bar z^{r-j}\overline{z^j\bar z^{r-j}}$

This gives different pairs $(m,n)$ such that $m^2+n^2=p^r$ for $0\le j< r-j$ of $r$ is odd and $1\le j\le r-j$ if $r$ is even. This makes $\lfloor (r+1)/2\rfloor$ solutions (I have counted only strictly positive solutions).