I'm interested in finding, with proof, the smallest length n of a binary linear cyclic code with a generator polynomial of degree 7.
I know that since the code is linear and cyclic, the dimension of the code is given by k = n - t, where t is deg$(g(x))$ = 7.
So I'm thinking that I can state that n = k + t and the shortest length occurs when k is minimal, i.e. k = 0 and therefore n = t = 7, giving a code of size $q^k = 2^0$ exclusively containing $g(x)$? This doesn't seem right to me, I don't think that's even linear.
Is there something I'm missing?
The smallest length of a cyclic code generated by $g(x)\in\Bbb{F}_2[x]$ is the smallest $\ell$ such that $g(x)\mid x^\ell-1$.
This $\ell$ is a bit awkward to figure out. We need the following observations:
Now we are well placed to attack the question. The only possible linear factor $x+1$ has $\ell_j=1$. The only possible quadratic factor $x^2+x+1$ has $\ell_j=3$. The irreducible cubics have both $\ell_j=7$ because $7=2^3-1$ is a Mersenne prime. Among the quartics there is a single irreducible $x^4+x^3+x^2+x+1$ with $\ell_j=5$, the others have roots of order $15$. Quintics won't do much because $\ell_j=31$ (Mersenne). With sextics there is a single irreducible with $\ell_j=9$, the rest are higher ($21$ or $63$). Septics give $\ell_j=127$ (Mersenne again).
Candidates: I'm sure that what you want is on this list :-)