How do I begin to prove that for every positive integer $q$, $q$ can be written in the form $q = y^2z$ for some integers $y$ and $z$ where $z$ is a possibly empty product of distinct primes?
The part that really stumps me is where $z$ is a possibly empty product of distinct primes. Any help to get me on the correct path would be appreciated.
Let $q =p_1^{r_1} \cdots p_n^{r_n}$ (By fundamental thm of arithmetics), where $p_i$ prime, $r_i \geq 0$, then wlog, let $r_i =2s_i +t_i$, where $t_i =0, 1$ and $s_i \geq 0$. Then, $y =p_1^{s_1} \cdots p_n^{s_n}$ and $z =p_1^{t_1} \cdots p_n^{t_n}$, yields $q =y^2 z$.