1

Given that squares of all primes above 5 are either 1 (mod 30) or 19 (mod 30), is this just a curious coincidence, or is there some straight-forward explanation?

My research has not lead me to any explanation, but I do think there is more going on here than just a curious coincidence. Any tips or pointers for learning more about this would be greatly appreciated.

To be sure, not asking for a proof here.

  • Both of the answers so far have given me new ways of looking at the relation. I am most grateful, and it is definitely not just some curious coincidence. – Richard Collins Jan 03 '14 at 08:26
  • 1
    With regard to the suggestion to close the question, I would request that the question stay, since it was not a request for a proof, as in the linked duplicate. The answers provided here to assist in understand as per the request. Also, I don't think it is fair to tag something as a duplicate when it predates what the question it is asserted as duplicating – Richard Collins May 25 '22 at 07:43

2 Answers2

2

In general, as $a^2 \equiv (-a)^2 \bmod p$ for any $a,p$, there are not many squares modulo a fixed residue. In your case, use Chinese Remainder Theorem to reduce the consideration to $\bmod 2$, $\bmod 3$ and $\bmod 5$. Let $p>5$ be a prime :

  • $2 \not \mid p$, so $p \equiv 1 \bmod 2$, showing $p^2 \equiv 1 \bmod 2$
  • $3 \not \mid p$, so $p \equiv 1,2 \bmod 3$, both lead us to $p^2 \equiv 1 \bmod 3$
  • $5 \not \mid p$, and the only remaining residues for squares $\bmod 5$ are $1,4$.

Thus, $p^2 \equiv 1 \bmod 30$ or $p^2 \equiv 19 \bmod 30$ depending on whether $p^2 \equiv 1 \bmod 5$ or $p^2 \equiv 4 \bmod 5$.

Now, if you like you can extend this result to $\bmod \; 120$ using that $p^2 \equiv 1 \mod 8$ for $p>2$.

benh
  • 6,605
2

Any prime $>3$ can be written as $6n\pm1$

$$(6n\pm1)^2=36n^2\pm12n+1=24n^2+24\frac{n(n\pm1)}2+1\equiv1\pmod{24}\ \ \ \ (1)$$

Any prime $p>3$ can be written as $\equiv\pm1,\pm2\pmod5$

$$\implies p^2\equiv1,4\pmod 5\ \ \ \ (2)$$

Now apply CRT on $(1),(2)$