My question: If $f(x)$ is irreducible of degree $d$ in $GF(q)$ then $f(x)\mid x^{q^n}-x$ if and only if $d\mid n$.
My try: Consider $f(x)\mid x^{q^n}-x$. Assume that $\alpha$ be a root of $f$ then $\alpha^{q^i}$, $1\leq i \leq d-1$ are other roots of $f$. The roots of $f$ are elements of the finite field $GF(q^d)$. The elements of $GF(q^d)$ are solutions of $x^{q^d}-x=0$ which results in $x^{q^d}-x \mid x^{q^n}-x$. The last relation is true iff $d\mid n$.
Is my proof correct?
Thanks for any suggestions.