Is the root of all numbers who have a lone prime factor irrational?

I've got what I think is a proof, am wondering if I've made a mistake.

Proof by contradiction: Suppose $\sqrt{n}=a/b$, with $a$ and $b$ being integers and coprime meaning $a/b$ is rational. Square it, so $n=a^2/b^2$ and take the $b^2$ over:

$b^2 n = a^2$

The way I see it, since $a^2$ is taking the prime factors of $a$ squared, it is impossible for there to be a lone factor in it. Meaning $a^2$ could be $2\cdot 2\cdot 3\cdot 3$, but not something like $2\cdot 5$ or $2\cdot 2\cdot 3$.

But if we look at the left side of the equation, any $n$ which has a lone factor, would have to be accompanied by another of the same value in $b^2$. Otherwise $a^2$ would have a lone factor in it which we already showed is not possible. But if $a$ and $b$ both share a factor, they can't be coprime.

This (I think) shows that the square root of any integer $n$ which has a lone prime factor is irrational.

• $a/b$ is rational for ANY integers $a$ and $b$ (whether they are coprime or not)!!! – barak manos Dec 14 '15 at 12:25
• "I've got what I think is a proof" - it's not really clear what you think, because the title makes very little sense, and you don't seem to bother to explain it. The root of every number of the form $p^{2n}$ (which obviously has a single prime factor), where $p$ is a prime number and $n$ is a natural number, is an integer (hence rational). – barak manos Dec 14 '15 at 12:28
• It's a proof by contradiction, as I said. What you're writing is nonsensical. Of course a/b with integers a, b is rational, that's what my proof is relying on... – Nimitz14 Dec 14 '15 at 12:49
• Yes, this seems like a correct proof. – tomi Dec 14 '15 at 13:04
• "with $a$ and $b$ being integers and coprime meaning $a/b$ is rational" - $a/b$ is rational regardless of the fact that $a$ and $b$ are coprime!!! – barak manos Dec 14 '15 at 13:14