Given a prime number $p$ such that $2p$ is equal to the sum of the squares of some four consecutive positive integers. Prove that $p-7$ is divisible by 36.
Problem
Source: RMO 2023 P2
Tags: number theory, prime numbers
29.10.2023 16:50
Let \[2p=(k-2)^2+(k-1)^2+k^2+(k+1)^2=4k^2-4k+6\]\[ \implies p=2k^2-2k+3\]Checking $\text{mod} ~3$, we get that $k \equiv 2 \pmod {3}$ and hence $k=3q+2$. Now \[ p-7=2k^2-2k-4\]\[ p-7=2(k^2-k-2)=2(k+1)(k-2)=2(3q+3)(3q)=18q(q+1)\]which implies that $36|p-7$ since $q(q+1)$ is always even for $q \in \mathbb{Z}$.
07.11.2023 21:58
$ a, b, c, d$ are consecutive numbers As a fact we know that for any number $x$, $x^2 \equiv 1 (mod \: 3)$ or $x^2 \equiv 0 (mod \: 3)$ As $a,b,c,d$ are consecutive, there are $3$ cases of their squares mod $3$ \begin{tabular}{ c c c c} $a^2$ & $b^2$ & $c^2$ & $d^2$ \\ 0 & 1 & 1 & 0 \\ 1 & 0 & 1 & 1 \\ 1 & 1 & 0 & 1 \end{tabular} $$a^2 + b^2 + c^2 + d^2 = 2p$$For the second and third cases, this cannot hold because $2p$ $\not\equiv 0$ (mod $3$) as p is prime. Now to check for $a \equiv 0 (mod \: 3)$ $a , b , c , d$ can also be written as $a$, $ a+1 $, $ a + 2$, $ a + 3$ $$ a^2 + (a+1)^2 + ( a+ 2)^2 + (a+3)^2 = 2p$$$\implies\to 4a^2 + 12a + 14 = 2p $ $\implies\to 2a^2 + 6a + 7 = p $ $\implies\to p-7 = 2a(a+3) $ Hence, $ 2a(a+3) \equiv 0 (mod \: 36) $ holds for $a \equiv 0 (mod \: 3)$
18.09.2024 13:48
Let $2p=(a-1)^2+a^2+(a+1)^2+(a+2)^2 \implies p-7=2(a+2)(a-1)$ ($a \geq 1 \in \mathbb{N}$). As $a+2$ and $a-1$ have different parities, we have that $4|p-7$. Now, it suffices to show that $9|p-7$. Claim: $a\equiv 1\pmod 3$. Proof: $FTSOC$, suppose otherwise. Notice that $a\equiv -1$ or $0\pmod 3$ gives that $3|p$. As, $p=3$ cannot be expressed as the sum of squares of four consecutive positive integers, we have that $a\equiv 1\pmod 3$ as desired. Thus, we have that $3|a-1$, and $3|a+2$. So, $9|p-7$. Combining, the divisility by $9$ and $4$, we see that $36|p-7$, and we are done!