Let $n$ be a positive integer and there be $p_1,p_2,p_3,........p_n$ prime numbers such that all of them are greater than $5$. If $6$ divides $p_1 ^2 + p_2 ^2 + p_3 ^2+\ldots +p_n ^2$, prove that $6$ divides $n$.

NOTE:- This problem is the $2nd$ question of $1998$ $RMO$ (Regional Mathematical Olympiad).
I tried using congruences with $2$ and $3$ on the first condition but it does not work.

  • $\begingroup$ Do you mean $p_1 ^2 + p_2 ^2 + p_3 ^2 + \cdots + p_n ^2$ ? $\endgroup$ – lhf Jan 7 '17 at 12:36
  • $\begingroup$ Yes. By "the first condition" ,I mean $6|(p_1 ^2 + p_2 ^2 + p_3 ^2 ......... p_n ^2)$ $\endgroup$ – Lucifer - Jan 7 '17 at 12:40
  • $\begingroup$ RMO stands for Regional or Romanian Mathematical Olympiad? $\endgroup$ – scummy Jan 7 '17 at 12:52
  • $\begingroup$ The convention with $\cdots$ in sums is you put a $+$ (or in some cases $-$ or $+-$) between the $\cdots$ and the adjacent terms. If you write $p_3^2\cdots p_n^2$ it usually means you multiply the numbers. To add them, write $p_3^2+\cdots+p_n^2$. Also note that many people put the $\cdots$ in the middle of the line, not at the bottom like $\ldots$, although this detail won't cause confusion. $\endgroup$ – David K Jan 7 '17 at 12:59
  • $\begingroup$ @scummy, it is for regional mathematical Olympiads.... (Held in different states of India) $\endgroup$ – Vidyanshu Mishra Jan 7 '17 at 13:25

Notice that every prime$>3$ is of the form $6n\pm1$, So square of every such prime will be $36n^2\pm12n+1$, so when you are adding all those squares, you will get something like:

$36(n_1^2+n_2^2+n_3^2......)+12(\pm n_1+\pm n_2.....)+ n(1)$..

The two terms containing $6$ and $12$ are divisible by $6$, the divisibility of whole by $6$ depends upon divisibilty of $n$ by $6$ and vice versa.

  • 1
    $\begingroup$ $36n^2\pm 12n+1$. $\endgroup$ – user371838 Jan 7 '17 at 12:45
  • $\begingroup$ great answer, thanks! $\endgroup$ – user394255 Jan 7 '17 at 13:16
  • $\begingroup$ Welcome @A.Molendijk $\endgroup$ – Vidyanshu Mishra Jan 7 '17 at 13:17

The sum of squares of $n$ odd numbers is $\equiv n\pmod 8$ because a single odd square is $\equiv 1\pmod 8$; similarly the sum of squares of $n$ numbers not divisible by $3$ is $\equiv n\pmod 3$. Hence under the given conditions, we even have $p_1^2+\ldots +p_n^2\equiv n\pmod {24}$, but of course in particular $p_1^2+\ldots +p_n^2\equiv n\pmod {6}$.


Using congruences on $2$ and $3$ works as follows:

For all primes $p_i\ge 5$, we know that $2 \nmid p_i$ and $3\nmid p_i$. Therefore $p_i^2\equiv 1 \bmod 2$ and $p_i^2\equiv 1 \bmod 3$, which immediately gives us that $p_i^2 \equiv 1 \bmod 6$ by the Chinese Remainder Theorem.

Clearly adding $n$ such prime squares to a total $s$ will only give us $s\equiv 0\bmod 6 $ (that is, $s\mid 6$) if $n\mid 6 $ also.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.