Prime factorization of square numbers Let n be a natural number with unique prime factorization $p^m$... $q^k$ . Show that n can be written as a square if and only if  all (m, ...k) are even

Assuming you mean written as a square, if $m,\dots,k$ are all even, $m=2m',\dots,k=2k'$ for some $m',\dots, k'\in\mathbb{Z}$ then 
$$
n=p^m\cdots q^k=p^{2m'}\cdots q^{2k'}=(p^{m'}\cdots q^{k'})^2.
$$
If $n$ can be written as a square, then for some $m$ with factorization $r_1^{a_1}\cdots r_n^{a_n}$,
$$
n=m^2=(r_1^{a_1}\cdots r_n^{a_n})^2=(r_1^{2a_1}\cdots r_n^{2a_n})=p^m\cdots q^k.
$$
Then for any prime $s$ in the factorization of $n$, $s|r_1^{2a_1}\cdots r_n^{2a_n}$, which implies there is a unique $r_i$ such that $s|r_i^{2a_i}\implies s|r_i\implies s=r_i$, since $s$ and $r_i$ are both prime. By uniqueness of the factorization, if $s$ has power $t$ in the factorization of $n$, $s^t=r_i^{2a_i}$, which implies $t=2a_i$, so all the powers in $p^m\dots q^k$ are even.
