# Characterizing the roots of rational numbers

I am trying to prove the statement: if $n \in \mathbb{Q}$ and $\sqrt[m]{n} \in \mathbb{Q}$ for all positive integers, then $n = 1$.

In my work, I have done all the work given by the top answer to this post. However, I'm not completely convinced by some of the justifications given there.

Take a rational $q$ with a factorization: $$q = \prod p_i^{q_i}$$ where each $q_i \in \mathbb{Z}$. I understand that each $q_i$ is uniquely determined in the integers. However, the same cannot be said in general: if we allow the exponents to take on non-integer values, uniqueness will be lost. For instance, we know that $5/6$ has a factorization of $5/6 = 5 \cdot 2^{-1} \cdot 3^{-1}$. However, it is also true that $5/6 = 3^{\log_3 5/6}$.

Hence, it is not necessarily true that the following product is necessarily irrational just from the fact that each exponent is non-integer as the answer seems to suggest. $$\sqrt[n]q = \prod p_i^{q_i/n} \qquad \exists q_i \neq kn$$

It is clear to me that each of the terms in the product is irrational, however, unfortunately that is not enough to conclude the entire product is irrational.

If someone can justify how $\sqrt[n]q$ is irrational in the above statement, the remainder of the work is fairly easy. I'd like to see some of the claims made in the above post, addressed in more detail.

If $\sqrt[n]{q}$ is rational, then it can be written uniquely as:
$$\sqrt[n]{q}=\prod p_i^{r_i}$$ where $r_i$ are integers.
But then $$q=(\sqrt[n]{q})^n = \prod p_i^{nr_i}$$
By uniqueness, then $nr_i=q_i$, so you can't have $q_i$ not a multiple of $n$.