Question: Prove that if $a$ and $b$ are integers and 8 divides $a^2$ + $3b^2$, then both a and b are even.
I'm able to prove that 8 divides $a^2$ + $3b^2$ if both $a$ and $b$ are even using the fundamental theorem of arithmetic and expressing 8 as $2^3$, but I'm not sure how to prove that 8 does not divide $a^2$ + $3b^2$ if either $a$ or $b$ is odd or both $a$ and $b$ are odd.
HINT:
$(2c+1)^2=8\dfrac{c(c+1)}2+1\equiv1\pmod8$
and $(2c)^2\equiv0,4\pmod8$