TITLE: Show $p(x)$ is a primitive polynomial
QUESTION [5 upvotes]: First the definition:

Polynomial $q(x) \in \mathbb{Z}_p[x]$ of degree $n$ is called primitive, iff:

$q(x) \mid x^{p^n-1}-1$
$\forall k : 1 \leq k \leq p^{n}-1$ : $q(x) \nmid x^k - 1$


Now the polynomial from my exam, where I should show that it is primitive:

$p(x)=x^6+x^5+x^2+x+1, \quad p(x) \in \mathbb{Z}_2$

So in this case $n=6$ and $p=2$, hence I need to check $1+(2^6-1)=64$ cases. How is this feasible to do on the exam, where I have just few minutes for each task without access to computer? Am I missing some "trick" to show that $p(x)$ is primitive?

REPLY [3 votes]: Assuming $p$ is irreducible it suffices to show that the order of a root $\alpha$ is at least $22$ (since the order divides $63$). This is easy to check with the linear recursion (in $\mathbb{F}_2$) $$a_n=a_{n-1}+a_{n-4}+a_{n-5}+a_{n-6}$$ which has period equal to the order of $\alpha$. Starting from $00000\,1$ this sequence continues as $$00000\,11110\,01001\,01010\,01\ldots$$ and so its period is more than $21$.