Show that every $n$ can be written uniquely in the form $n = ab$, with $a$ square-free and $b$ a perfect square
Solution 1:
As others have mentioned, the number 1 is both squarefree and a square. When $n=1$, we have $a=b=1$. When $n$ is a prime, we have $a=n$ and $b=1$. This is perfectly valid.
Let me expand on the first method mentioned by lhf. In general, let $$N=\prod_{\text{primes }p_i}p_i^{e_i}$$ be the prime decomposition of a number $N$. Note that $N$ is squarefree if and only if each $e_i$ is either 0 or 1, and $N$ is a square if and only if every $e_i$ is even. So if we want to write $n=ab$ where $a$ is squarefree and $b$ is a square, then if their prime factorizations are as follows, $$n=\prod_{\text{primes }p_i}p_i^{x_i}\hskip0.3in a=\prod_{\text{primes }p_i}p_i^{y_i}\hskip0.3in b=\prod_{\text{primes }p_i}p_i^{z_i}$$ then we want to solve $$n=\prod_{\text{primes }p_i}p_i^{x_i}=\prod_{\text{primes }p_i}p_i^{y_i+z_i}=ab$$ such that each $y_i$ is either 0 or 1, and each $z_i$ is even. Can you see why this uniquely specifies all the $y_i$'s and $z_i$'s, and hence uniquely specifies $a$ and $b$?
Solution 2:
HINT $\ $ The problem is multiplicative so it suffices to show that it's true for a prime power $\rm\ P^N\:.\ $ But that's trivial: $\rm\ P^{2N} =\ (P^N)^2,\ \ P^{\:2N+1} =\ P\ (P^N)^2\:,\ $ uniquely.