Find the minimal $n$ for there exists $[n,n-5]$ cyclic binary code with generator polynomial $g(x)=1+x^4+x^5$.
I couldn't figure out the answer. The only way I could think of is find out all the factorizations for $x^n-1$ for each $n>5$, but it is really hard work and I don't think this is what I should do. I am learning with Raymond Hill's book A First Course in Coding Theory and I couldn't find any theorem that will help me figure it out.
Thanks.
Let $\alpha$ be a root of $g(x).$ Then we have that $\alpha^5=\alpha^4+1$. ( We works in $\mathbb{Z}_2$) Therefore we get $$ \begin{gather*} \alpha^6=\alpha^5+\alpha=\alpha^4+\alpha+1,\\ \alpha^7=\alpha^5+\alpha^2+\alpha=\alpha^4+\alpha^2+\alpha+1,\\ \ldots \end{gather*} $$ and so on untill you will obtain $\alpha^n=1$ for some $n.$ Then $n$ is the codelenght of the cyclic code.