# A positive integer with is not a perfect square is a product of distinct prime factors

This was used as part of the explanation for the following question, but I don't see why it is true.

How to understand Apostol's proof of the irrationality of $\sqrt{n}$ if $n$ is not a perfect square?

• Positive integers (greater than $1$) are a product of prime numbers in an essentially unique way, and this is the fundamental theorem of arithmetic. For example $12=2 \times 2 \times 3$. So what do you mean by the question? – Henry Nov 22 '14 at 17:27
• a product of distinct prime factors contains no repeated prime factors. as pointed out below I was missing an important condition – trebob Nov 22 '14 at 17:42

That isn't quite what was claimed. Rather, a positive integer $n$ which is not a perfect square and has no square factors greater than $1$ is necessarily a product of distinct prime factors.
The idea is to use unique prime factorization. Since $n$ isn't a perfect square, then $n>1,$ and so $n$ can be written uniquely as a nontrivial product of powers of primes. That is, there is some positive integer $k,$ some positive integers $e_1,...,e_k,$ and some distinct positive primes $p_1,...,p_k$ such that $$n=\prod_{j=1}^kp_j^{e_j}.$$ Now, all of the primes $p_j>1,$ and so $p_j^2>1$ for $1\le j\le k.$ Since it then follows that $p_j^2$ is not a factor of $n$ for any such $j,$ then we have $e_j=1$ for $1\le j\le k,$ and so $$n=\prod_{j=1}^np_j,$$ as desired. If we had $e_j\ge 2$ for some $1\le j\le k,$ we would be able to write $p_j^{e_j}=p_j^2p_j^{e_j-2}=p_j^2m,$ where $m$ is an integer since $e_j\ge 2.$ This would then make $p_j^2$ a factor of $n,$ which is impossible.