A counterexample to "$k\mid n$ if and only if $k\mid n^2$" I am looking to prove the following statement false:
Let $k$ be a positive integer, then $k\mid n$ if and only if $k\mid n^2$.
So I am trying to find a $k$ where this does not hold but after aimlessly trying numbers I was curious if there is a methodical way to find $k$.
 A: $12$ does not divide $6$, but it divides $6^2=36$.
A: $9\mid 12^2$ but $9\nmid 12$. ${{{{{{{{{{}}}}}}}}}}\qquad{{{{{{{{{{}}}}}}}}}}$
A: The methodical way would be to notice that this is in fact true, if $k$ is a prime number.
Then take the smallest non-prime (greater $1$), $k=4$. Then it is not far to see that $4$ does not divide $n=2$, but it does divide $n^2=4$.
A: One could even take $k = n^{2}$ for $n > 1$. Then we'd have that $k|n^{2}$ but $k$ does not divide $n$.
A: Hint $\,\ k\mid n^2\!\iff\! k\mid n\,\ $ is true $\iff k\,$ is squarefree (see there for many characterizations)
For if $\,k\,$ is not squarefree then $\, k = ab^2,\,\ b\nmid 1,\,$ hence $\,k\mid (ab)^2\,$ but $\,k\nmid ab\,$ (else $\,b\mid 1).$
Conversely if $\,k\,$ is squarefree then every prime $\,p_i\,$ in the unique prime factorization of $\,k\,$ occurs to the power $\,1.\,$ By Euclid's Lemma $\,p_i\mid k\mid  n^2\,\Rightarrow\,p_i\mid n,\,$ therefore $\,k = {\rm lcm}\{\,p_i\}\mid n,\,$ by existence & uniqueness of prime factorizations (or by lcm = product for coprimes)
