Show that for all $a\in\mathbb{N}$, there exists $b\in\mathbb{N}$ and square-free integer $c$ such that $\sqrt{a}=b\sqrt{c}$. I'm having some difficulties continuing this problem. I get that $b^2\mid a$ and $c\mid a$ but I am not sure where to go from there.
 A: Let $a$ be a positive integer. Let $b^2$ be the largest perfect square that divides $a$. (We may choose $b\gt 0$.) Then $a=b^2 c$ for some positive integer $c$. 
Moreover, $c$ is  square-free. For if it were divisible by some $k^2\gt 1$, then $(kb)^2$ would divide $a$, contradicting the definition of $b$.
Finally, $\sqrt{a}=\sqrt{b^2c}=b\sqrt{c}$.
A: Hint $\ $ We seek to write $\, a = b^2 c\,$ with $\,c\,$ squarefree, i.e. $\,d^2\mid c\,\Rightarrow\, d = 1.\,$ The set $\,S\,$ of squares dividing $\,a\,$ is nonempty$\,(1\in S)\,$ and is bounded above, so $\,S\,$ has a largest element $\,b.\,$ Note that if $\,d^2\mid c = a/b^2\,$ then $\,(bd)^2\mid a,\ $ so $\,bd \le b\,$ (by maximality of $\,b),\,$ so $\,d = 1.$ 
Remark $\ $ The only properties of $\,S\,$ we used are: $\,1\in S\,$ and $\,S\,$ is closed under multiplication, i.e. $\,S\,$ is a monoid. So the proof works for any such $\,S\,$ to show that $\,a = s c\ $ where $\,c\,$ is $\,S$-free, $ $ i.e. $\,c\,$ is not divisible by any element of $S$ (except $1)$. 
Said procedurally: start with the rep $\,a = 1\cdot a.\,$ If some $\,s_1\mid a\,$ then pull this factor out to get $\,a = s_1\cdot (a/s_1),\,$ then recurse on $\ a/s_1\,$ to obtain $\,a/s_1 =\, s_2\cdots s_n\, c,\,$ where $\,s_i \in S\,$ and $\,c\,$ is $S$-free. Then $\,a\, =\, s_1\cdots s_n\, c\, = sc\ $ and $\,s\in S\,$ since $\,S\,$ is closed under multiplication. 
A: Let $ a=p_1^{a_1}\cdots p_r^{a_r} p_{r+1}^{a_{r+1}}\cdots p_s^{a_s}$ where $a_i$ is even for $1\le i\le r$ and $a_i$ is odd for $r+1\le i\le s$.
If $a_i=2c_i$ for $1\le i\le r$ and $a_i=2c_i+1$ for $r+1\le i\le s$ and $b=p_1^{c_1}\cdots p_s^{c_s}$,
then $\sqrt{a}=b\sqrt{c}$ where $c=p_{r+1}\cdots p_s$ is square-free.
