Prove that if a number $n > 1$ is not prime, then it has a prime factor $\le \sqrt{n}$.

Prove that if a number $n > 1$ is not prime, then it has a prime factor $\le \sqrt{n}$.

My answer is that this is not always true, because you can pick a non-prime number that is greater than $1$ and its factor is equal to its square root.


The result you are asked to prove is true. Suppose that $n\gt 1$ is composite. Then there exist positive integers $a$ and $b$, neither of which is equal to $1$, such that $ab=n$.

At least one of $a$ and $b$ is $\le \sqrt{n}$. For if both are $\gt \sqrt{n}$, then their product is $\gt (\sqrt{n})(\sqrt{n})=n$, contradicting the fact that $ab=n$.

Finally, without loss of generality we may assume that $a\le \sqrt{n}$. Since $1\lt a \le \sqrt{n}$, it follows that $a$ has a prime factor $p\le \sqrt{n}$. But $p$ is a prime factor of $n$.