I'm working on the following problem:
Let $q=p^n$, and let $p_1,...p_r$ be distinct prime factors of $q-1$. Show that if $$x^{\frac{q-1}{p_i}} \neq 1$$ for any $p_i$, then $x$ is a generator.
Now, I know that if $x$ is to be a generator, then the order of $x$ ($|x|$) must equal $q-1$. I also know that Lagrange's Theorem tells us that the only candidates for $|x|$ are products of $p_1,...p_r$. However, just because $$x^{\frac{q-1}{p_i}} \neq 1$$ for any $p_i$, could we not still have $$x^{\frac{q-1}{p_1*p_2}} \neq 1 $$ or any other product of $p_1,...,p_r$ in the denominator? How can I rule those out as well?
Hint Assume by contradiction that $x$ is not a generator. Then $$x^a =1$$ for some strictly smaller divisor $a|q-1$.
If $p$ is one of the prime divisors of $\frac{q-1}{a}$ show that $a|\frac{q-1}{p}$ and hence $$x^{\frac{q-1}{p}}=1$$
P.S. The proof boils down to this: $\frac{q-1}{p}$ are all the maximal divisors of $q-1$, and hence any non-trivial divisor of $q-1$ must divide one of them.
This implies that $x^a=1$ for some non trivial divisor if and only if $x^a=1$ for some maximal divisor.