Integer to Rational Power is Irrational iff not Integer or Reciprocal

Theorem
Let $m$ be a rational number.

Let $n$ be a positive integer.

Then $n^m$ is an irrational number if and only if $n^{|m|}$ is not an integer.

Necessary Condition
Let $n^{|m|}\not\in\Z$ and suppose $n^m\in\Q$.

Then $|m|>0$ since $|m|=0$ implies $n^{|m|}\in\Z$.

Then $n^{|m|}=n^{p/q}=r/s$ and $n^p=r^q/s^q$ for some $p,q,r,s\in\Z_{>0}^4$ where $r$ and $s$ have no common prime factors.

Since $r^q/s^q=n^p\in\Z_{>0}$, $r^q$ is divisible by $s^q$.

By the fundamental theorem of arithmetic $r^q$ and $s^q$ have the same prime factors as $r$ and $s$, respectively.

Then $s=1$ since $s^q\mathop\backslash r^q$ and $s\not=1$ imply $r$ and $s$ have a common prime factor.

Then $n^{|m|}=r/s$ and $s=1$ imply the contradiction $r=n^{|m|}\not\in\Z$.

So $n^m\not\in\Q$ and $n^m\in\R\setminus\Q$ since $n^m\in\R$.

Sufficient Condition
Now let $n^m\in\R\setminus\Q$.

Then $n^{-m}\in\R\setminus\Q$ since $n^{-m}$ is the reciprocal of $n^m$.

So $n^{|m|}\in\R\setminus\Q$ and $n^{|m|}\not\in\Z$ since $\Z\subseteq\Q$.