1

I am looking for a demonstration of the formulas to decompose a prime $p\equiv 1$ $mod$ $4$ in the sum of two squares, cited in H. Davenport, The Higher Arithmetic. I have not found anything on the web. Thank you.

If $p=4k+1$ , with $p$ prime,

$p=x^2 + y^2$ , with

$x\equiv\frac{(2k)!}{2(k!)^2}$ $mod$ $p$

$y\equiv(2k)! x$ $mod$ $p$

and

$x < \frac{p}{2},y < \frac{p}{2}$

1 Answers1

1

We have $$x^2+y^2=x^2(1+((2k)!)^2)=x^2[1+(1)(2)\cdots(2k)(-1)(-2)\cdots(-2k)]\ ,$$ this being true because we have inserted an even number of negatives. Modulo $p$, therefore, $$\eqalign{x^2+y^2 &\equiv x^2[1+(1)(2)\cdots(2k)(2k+1)\cdots(4k-1)(4k)]\cr &\equiv x^2[1+(p-1)!]\cr &\equiv0\cr}$$ because $(p-1)!\equiv-1$ modulo $p$ by Wilson's Theorem. Therefore $x^2+y^2$ is a multiple of $p$.

Edit following comments from the OP and revision of the question: this does not guarantee that $x^2+y^2$ is equal to $p$, however it appears that the extra conditions $|x|<\frac{p}{2}$ and $|y|<\frac{p}{2}$ do ensure this.

David
  • 82,662
  • I have observed that if $x < \frac{p}{2},y < \frac{p}{2}$ the formulas work; for example: $p=29$, for $x=5$ and $y=2$. – Vincenzo Palmisano Feb 03 '14 at 12:33
  • Your reasoning is correct, for all x, because it uses only the ratio $\frac{y}{x}$, but $x$ has a particular expression as a function of $n$, and this implies that $x$ and $y$ solve the problem; of course, the formulas do not have a practical use for large numbers because of the factorial! – Vincenzo Palmisano Feb 03 '14 at 14:05
  • @Vincenzo, could you please give details of the calculations in the case $p=13$? Perhaps I misunderstood the formulae you gave. – David Feb 03 '14 at 23:36
  • David, you can directly see the reference that I quoted here, http://books.google.it/books?id=pGDckKsed3EC&pg=PA115&hl=it&source=gbs_toc_r&cad=4#v=onepage&q&f=false , at the end of page 121. There is the example for $p=29$, and it is specified that must be " $x$ and $y$ numerically less than $\frac{1}{2}p$". – Vincenzo Palmisano Feb 04 '14 at 12:09
  • In the case $p=13$, $x\equiv10\equiv-3,$ and $y\equiv11\equiv-2,$ $mod$ $13$; $x$ and $y$ are less than $\frac{{13}}{2}$ and $x^2 + y^2 = 9+4 = 13$ – Vincenzo Palmisano Feb 04 '14 at 12:26
  • @Vincenzo The usual meaning of reducing a number modulo $p$ is that the result should be from $0$ to $p-1$. Perhaps you could clarify your original post by stating that $x,y$ are to be numerically less than $\frac{1}{2}p$. – David Feb 04 '14 at 22:55
  • David you are right, I correct the original post to avoid misunderstandings. With this clarification, do you have any idea to prove the formulas? I think they are interesting in theory though not useful in practical calculations. – Vincenzo Palmisano Feb 05 '14 at 00:50