Any integer can be written as $x^2+4y^2$

242 Views Asked by At

If $n$ is a positive integer with $(n,8)=1$ and $-4$ is square $mod$ $n$ then $n$ can be written in this form: $n=x^2+4y^2$.

I was using that there are x, y integers satisfying $x^2+4y^2=kn$ where $0<k<4$, let's consider $k=1,2,3$

  1. If $k=1$ the result is completed.
  2. If $k=2$, $x^2+4y^2=2n$, then $x^2=2n$ $mod$ $n$ as $(n,8)=1$ $n$ is odd, so $n=2t+1$ thus, $x^2=2n=4t+2$ $mod$ $n$, this is $x^2=2$ $mod$ $n$, but it cannot be true because an square is always $0$ or $1$ $mod$ $4$.
  3. Now when $k=3$, I haven't found anything. Anybody can help me! Every idea is appreciated. Thanks
1

There are 1 best solutions below

1
On BEST ANSWER

Well, the most elementary way is to use the fact that if all prime divisors of $n$ are of the form $4k+1$ then one can represent $n=a^2+b^2,$ which is a direct consequence of Fermat's theorem on two squares. Since $n$ is odd, one has that either $a$ or $b$ is even. Hence, $n=a^2+4b_1^2.$ So we are left to show that all prime divisors of $n$ are of the form $4k+1.$ Indeed, since there is such $x,$ that $x^2=-4(\mod p)$ we can raise both sides to the power $(p-1)/2$ and apply Fermat's Little theorem to get $(-1)^{(p-1)/2}=1(\mod p).$ Thus, $(p-1)/2$ has to be even and the result follows.