Let $C$ be a $[n,k]$ cyclic code over $\mathbb{F}_q$ with $(n,q)=1$.
I want to show that $(1, \dots, 1)$ is a codeword iff $X-1 \nmid g(X)$.
$g(x)$ is the generator polynomial.
We suppose that $(1, \dots, 1)$ is a codeword.
We consider the following correspondence
$$\pi: \mathbb{F}_q^n \to \mathbb{F}_q[x] / x^n-1, (a_0, a_1, \dots, a_{n-1}) \mapsto a_0+ a_1 x+ \dots+ a_{n-1} x^{n-1}$$
Then $(1, \dots, 1) \mapsto 1+ x+ \dots+ x^{n-1}$.
We want to show that $X-1 \nmid g(X)$.
Then $g(X)=b(X)(X-1)$ for some polynomial $b(X)$. How can we get a contradiction?
How can we show that if $X-1 \nmid g(X)$ then $(1, \dots, 1)$ is a codeword?