if $40|a^2$ prove that $20|a$ when $a$ is an integer So this is a homework question, and I'm stuck. I'm also, to be perfectly honest, not quite sure where to start. 
What I tried to do is take the square root of both $40$ and $a^2$ and I got $2\sqrt{10}\text{ } | \text{ }a$  and from here I could see that if I factored 40 before I took the square root and forced the result, then I could get $(\sqrt{4} * 10) | \sqrt{a^2}$ which would give me $20|a$, but that seems, to me, to be mathematically incorrect, as I would assume that I have to take the square root of everything...I also know that I can't just assume that $a^2$ would be divisible by $2$ as that was my next thought, but $9^2 = 81$ and so dividing by 2 just because seemed like an even worse idea...
I know I haven't really tried (with any success) anything to solve this, but any help would be greatly appreciated!  
 A: Hint: If $40\mid a^2$, then $10\mid\left(\frac a2\right)^2$
A: Hint: can you prove that $a$ is even? Divisible by $4$? Divisible by $5$? Do it step by step and put the pieces together.
A: I'll try a proof by contradiction.
Suppose
$20 \not\mid a$.
Then either
$4\not\mid a$
or
$5\not\mid a$.
If
$4 \not\mid a$,
then
$a 
=4k+j
$,
where
$1 \le j \le 3$.
Then $a^2
=16k^2+8kj+j^2
=8(2k^2+kj)+j^2
$.
But,
$8 \not\mid j^2$
so
$8 \not\mid a^2$,
so
$40 \not\mid a^2$.
Similarly,
if
$5 \not\mid a$,
then
$a = 5k+j$
where
$1 \le j \le 4$.
Then
$a^2
=25k^2+10kj+j^2
=5(5k^2+2kj)+j^2
$.
But $5 \not\mid j^2$,
so
$5 \not\mid a^2$,
so
$40 \not\mid a^2$.
Therefore,
if
$20 \not\mid a$,
then
$40 \not\mid a^2$,
and we are done.
A: i think i have a solution.
$40=2^3\times 5|a^2=a\times a$.$\space$ therefore $2|a^2$ so $2|a$.$\space$ also, $5|a$.$\space$ so $a=(5b)(2c);\space b,c\in Z^+$.$\space$ making $a^2=5^22^2b^2c^2,$ where $2|b^2c^2$ because $2^3|a^2.$$\space$ therefore $2|b^2$ or $2|c^2$ so $2|b$ or $2|c$.$\space$ so $b^2c^2 =(2^2{p_2}^2{p_3}^2...{p_n}^2)(b^2$ or $c^2)$;$\space p_2,p_3,...,p_n$ other prime factors,$\space n\in Z^+$.
so $a^2=5^22^2(2^2{p_2}^2{p_3}^2...{p_n}^2)(b^2$ or $c^2)$; and $a=5^12^2\sqrt{{p_2}^2{p_3}^2...{p_n}^2(b^2\space or\space  c^2)}=20(\sqrt{{p_2}^2{p_3}^2...{p_n}^2(b^2\space or\space c^2)})$.  $\space \therefore 20\mid a$ 
