# number of ways of expressing a number as sum of 5 squares modulo 10

Look at the function $r_5(n)$, which is defined by the number of ordered integers $(a,b,c,d,e)$ which satisfy $a^2+b^2+c^2+d^2+e^2= n$. Now, I have conjectured that the unit's digit of $r_5(n)$ is 2 when $n$ is of the form $5p^2$, and its unit's digit is 0 when $n$ is not of that form. Is there any proof for my conjecture?

I have checked this for very large values of $p$ (upto $p= 100$). But can this be proved?

-
For what it's worth, these numbers are tabulated at oeis.org/A038671 (but for positive $a,\dots,e$). –  Gerry Myerson Jul 19 '13 at 12:28
I wouldn't call $p=100$ very large :) –  Thomas Andrews Jul 19 '13 at 12:28
Requesting to close this for a week, as this is a Brilliant problem. –  Calvin Lin Jul 19 '13 at 14:38
@CalvinLin I've deleted my answer. Wondering, how does Stack Exchange support closing a question for a period - is it something that needs to be re-opened explicitly, or is that a SE mechanism for temporary closures? –  Thomas Andrews Jul 19 '13 at 14:43
@ThomasAndrews Thanks. I'm not too sure what their procedure is. Currently, I flag the question and a moderator closes or deletes it. I would favorite the question, so that I can flag it for reopening in a week. –  Calvin Lin Jul 19 '13 at 14:45