Proving that a natural number is divisible by $3$ I am trying to show that $n^2 \bmod 3 = 0$ implies $n \bmod 3 = 0$.
This is a part a calculus course and I don't know anything about numbers theory. Any ideas how it can be done? Thanks!

Hint $\rm\ (1+3k)^2 = 1 + 3\:(2k+3k^2)$   
and $\rm\ \ \ (2+3k)^2 = 1 + 3\:(1+4k+3k^2)$
Said mod $3\!:\ (\pm1)^2 \equiv 1\not\equiv 0\ \ $ (note $\rm\: 2\equiv -1$)
