Calculating Galois group of $X^{10}-1$ modulo $p$ Kind of new to Galois theory. I'm interested in computing the galois group of $x^{10}-1$ modulo $p$ for a $p$ a prime number. (let's assume $p$ is not $2$ or $5$).
There are two results that I know of but they seem to contradict eachother:


*

*By factoring, the $G$ has the same galois group as $1+x+x^2+x^3+x^4$, which I know is irreducible modulo $p$ if and only if $p$ is a generator of $F_5$ (special case of more general result). Thus, if $p$ is a generator of $F_5$, because the roots of  $1+x+x^2+x^3+x^4$ are $a,a^2,a^3,a^4$ for some $a$, $a$ must have degree $4$ in $F_5$, and thus $G$ is $Z/4Z$. 

*For any nonzero $a$ in a field $k$, the Galois group over $k$ of the polynomial $X^n-a$ is cyclic, of cardinal $d|n$. By factoring $x^{10}-1$ this would imply its Galois group $G$ is the same as that of $x^{5}-1$, which is thus either the identity or $Z/5Z$. This contradicts the above result.
I am not sure which one is false, but I'm guessing there is an easier way to know the cardinal of $G$?
 A: Here is an answer, I will address your mistakes later below. Let's first ignore $p=2,5$. Then the splitting field $K$ of $x^{10}-1$ is obtained by adjoining a primitive 10th root of unity. Let the degree of $k$ over $\mathbb F_p$ be $r$.
So by Lagrange applied to the multiplicative group, $10$ divides $|K^*| = p^r - 1$. On the other hand, the multiplicative group is cyclic, so by the converse of Lagrange it has an element of order 10 exactly when 10 divides its order.
Putting these together, we see that it splits when $r$ is the smallest integer such that $10$ divides $p^r - 1$, or equivalently the degree of the splitting field is the order of $p$ in $(\mathbb Z/10\mathbb Z)^*$.
If $p=2$ then $x^{10} - 1 = (x^5 - 1)^2$ and so you can apply analogous logic to $x^5 - 1$. Likewise if $p=5$ then $x^{10 }- 1 = (x^2 - 1)^5$ and you can go through the same deal (or take advantage of the fact that you just have a quadratic equation).
In your first answer, I don't really follow the factorization, since there are a couple other irreducible factors that you should consider just over $\mathbb Q$, and even then it's not clear how those reduce mod $p$.
Now, as for your second answer, you are making a major (although not uncommon) mistake about the Galois group of $x^n-a$. The result you quote is only true if the ground field contains all of the $n$th roots of unity.
In fact, as we can see above, both of your answers are wrong. One can see that $(\mathbb Z/ 10\mathbb Z)^*$ is cyclic of order $4$, and so depending on the prime the degree could be 1, 2, or 4 (try $p=11,19,3$, respectively).
