Unclear proof of irreducibility on $x^m+1$ I came across this problem and frankly, it's unclear looking at the solution.

Prove $x^m+1$ irreducible in $\mathbb{Q}(x)$ if and only if $m=2^k$ for $k \in \mathbb{N}$

Well the solution's short at least for one way(which I find to be obscure)

Let $m=pr$ for some odd prime $p$ and $r \in \mathbb{N}$. Set $t=x^r$.
$$x^m+1=t^p+1=(t+1)(t^{p-1}-t^{p-2}+...+1)$$
and so $x^m+1$ is irreducible in $\mathbb{Q}(x) \Rightarrow $ $m$ has no odd factors $\Rightarrow$ $m=2^k$ for $k \in \mathbb{N}$

How does $x^m+1=t^p+1=(t+1)(t^{p-1}-t^{p-2}+...+1)$ tell me that "$x^m+1$ is irreducible in $\mathbb{Q}(x)$"? And how does this imply that "$m$ has no odd factors"?
The last bit of the solution seems very rushed to me, I don't see the connection between the presented equation and the statements that follow.
Is this trying to say, let's say $m$ has at least one odd factor(I don't know why it has to be prime though), and try putting that into $x^m+1$ and see what happens...oh, it's reducible $(t+1)(t^{p-1}-...+1)$, so we can't have that! Hence no prime factors, thus $m=2^k$. Is this so?
 A: First off, $p$ does not have to be prime, it just needs to be odd. I think they just said that $p$ was prime in order to emphasize the point that $m \neq 2^k$. If $m$ has an odd divisor, then $m$ has an odd prime divisor and vice versa. Also, if $m \neq 2^k$, then $m$ has an odd divisor and vice versa. Anyway, let's look at their equation again.
$$x^m+1=t^p+1=(t+1)(t^{p-1}-t^{p-2}+...+1)$$
Here, $t=x^r$, so substitute into the right-hand side:
$$x^m+1=(x^r+1)(x^{rp-r}-x^{rp-2r}+...+1)$$
Therefore, we have found a factorization of $x^m+1$ that works for any $m$ with an odd factor. Thus:
$$m \neq 2^k \implies m \ \text{has an odd factor} \implies x^m+1 \ \text{is reducible}$$
However, that's not what they wrote. They wrote the contrapositive of this statement, which is logically equivalent:
$$x^m+1 \ \text{is not reducible} \implies m \ \text{has no odd factor} \implies m=2^k$$
I'm not sure why they did this as it's kind of confusing, but it is still valid logic. However, this statement alone does not conclude the proof. We still need to prove the following:
$$m=2^k \implies x^m+1 \ \text{is not reducible}$$
For the proof to this case, look at @SBareS's answer to this question.
A: Your understanding of the proof is correct. Note that if a number has any odd factor, then it also has an odd prime factor, but you are right that there is no need for the factor to be prime for the proof to work.
The proof only contains a proof of the "only if" part, ie. 
$$\left(x^m + 1\mathrm{\ is\ irreducible}\right) \implies \left(m=2^k\right)$$
but not the "if" part, ie.
$$ \left(m=2^k\right)\implies \left(x^m + 1\mathrm{\ is\ irreducible}\right)$$
For a proof of the opposite implication, see this question.
