Which numbers are square modulo 9? How can I prove that n = $1,4,7,9$ for every integer k such that $k^2 = n$ (mod9)?

k^2 = n mod 9
I would start with observing that for any integer k, k=9a+b where b=0,1,2,3,4,5,6,7 or 8 and a is any integer.
so, k^2 = (81 a^2 + 18ab + b^2) = b^2 mod 9
So possible solutions for n are 0,1,4,9,16,25,36,49,64 = 0,1,4,0,7,7,4,1 mod 9 = 0,1,4,7 mod 9
