Let $p>3$ a prime number. Prove that there exist $x,y \in \mathbb Z$ such that $p = 2x^2 + 3y^2$ if and only if $p \equiv 5, 11 \; (\mod 24)$ (20 points)
Problem
Source: Iran 3rd round 2013 - Number Theory Exam - Problem 3
Tags: modular arithmetic, number theory proposed, number theory
11.09.2013 18:24
goldeneagle wrote: Let $p>3$ a prime number. Prove that there exist $x,y \in \mathbb Z$ such that $p = 2x^2 + 3y^2$ if and only if $p \equiv 5, 11 \; (\mod 24)$ (20 points) Prove: If $p=2x^2+3y^2$ then $p \equiv 5,11 \pmod{24}$. Since $p>3$ then $x^2 \equiv 1 \pmod{3}$. Hence $p \equiv 2 \pmod{3}$. If $x^2 \equiv 0 \pmod{4}$ then $p \equiv 3y^2 \equiv 3 \pmod{8}$. If $x^2 \equiv 1 \pmod{4}$ then $p \equiv 3y^2+2 \equiv 5 \pmod{8}$. Thus, $p \equiv 5,11 \pmod{24}$.
12.09.2013 15:54
See here http://www.artofproblemsolving.com/Forum/viewtopic.php?f=57&t=552600
08.12.2023 15:17
How can I submit my solution? I am a new user here, AoPs does not allow me to upload photos, but I don't have a photo in my solution( The proof of the second half: Let p be a prime such that $p=5$ or $11(mod$ $24)$, then $(\dfrac{-6}{p})=(\dfrac{-1}{p})(\dfrac{2}{p})(\dfrac{3}{p}) =(-1)^{(p-1)/2}(-1)^{(p-1)/2}(-1)^{(p^2-1)/8}*(\dfrac{3}{p})=1$. Then there exists such a number $x$ with $x^2 \equiv -6 \pmod {p}$. By Thue's lemma we know that there exist such integers $a, b$ with $0<|a|, |b|<\sqrt{p}$ and $a \equiv bx \pmod {p}$, $a^2-b^2*x^2 \equiv a^2+6b^2$ is divisible by $p$, but it is less than $7p$ 1)$a^2+6b^2 =6p, 6a_1^2+b^2=p$ but $p=2(mod 3)$, a contradiction 2) $a^2+6b^2=4p, 2a_1^2+3b^2=2p$, $a_1^2+6b_1^2=p$, mod 3 gives the contradiction 3) $a^2+6b^2=3p, 3a_1^2+2b^2=p$ 4) $a^2+6b^2=2p, 2a_1^2+3b^2=p$ 5) $a^2+6b^2=p$, but p is 2 (mod 3), a contradiction 6) $a^2+6b^2=5p$. Then assume several cases: i) $a=5k \pm 1, b=5m \pm 2$, substitute and then divide by 5 and get: $$2(k \pm 3m \pm 1)^2+3(k \pm 2m \pm 1)^2 =p,$$where $\pm$ depends on a and b; ii) $a=5k \pm 2, b=5m \pm 1$, analogously we have: $$2(k \pm 3m \pm 1)^2+3(k \pm 2m)^2=p$$and we are done