I want to describe the set of numbers $a$ such that if $a \mid b^2$ then $a | b$ for all positive integers b using the prime factorizations of $a$ and $b$.
What would be a good way to approach this problem?
I know I can list $a^2$ and $a$ with respect to their prime factorizations but I am stuck at what to do after that.
They are the square-free integers.
In other words those of the form $p_1p_2 \dots p_k$ where $p_i$ is a distinct prime for each $i$.
Clearly if $n$ is squarefree and $n\mid a^2$ then every prime of $n$ divides $a$ and therefore, $n$ divides $a$ (since $n$ is the least common multiple of its prime divisors).
Suppose a number is not square free, write it as $n=p^{a}k$ with $a>1$ and $p \nmid k$, let $x=\lceil a/2 \rceil$. Then $n\mid p^{2x}k^2$ and $n\nmid p^xk$.