Idempotents in $\Bbb Z_2[x]/(x^7+1)$ I am trying to find idempotent elements in $R:=\Bbb Z_2[x]/(x^7+1)$. Of course $0,1$ are idempotents. 
My attempt: For $f \in 
\Bbb Z_2[x]$, let $\bar{f}$ denote its residue class. We may assume that $\deg (f)<7$. Suppose $\bar{f}$ is an idempotent. Then $\bar{f}^2-\bar{f}=0$ in $R$, so $f^2-f$ is a multiple of $x^7+1=x^7-1=(x-1)(x^6+x^5+x^4+x^3+x^2+x+1)$. But I can't find how to proceed. Any hints?
 A: We can write any element of $R$ using the lowest degree polynomial in its coset. So if $I=\langle x^7+1\rangle$, then the general element $f$ looks like
$$
f=\sum_{i=0}^6b_ix^i+I
$$
with $b_i\in\Bbb{Z}_2$, $i=0,1,\ldots,6$.
The hints (prove these if you don't know them already):


*

*By Freshman's Dream $$f^2=\sum_{i=0}^6b_ix^{2i}+I.$$

*Because $x^7+I=1+I$ we have $x^a+I=x^b+I$ whenever $a\equiv b\pmod7$.

*$f$ is an idempotent if and only if $b_i=b_{2i}$ for all $i$. The subscript $2i$ is calculated modulo $7$.


When the fog has cleared up you should see a total of eight idempotents in this ring (you can freely choose a carefully picked subset of the $b_i$s but the other coefficients are constrained).
A: In this answer, I assume $\mathbb{Z}_2=\mathbb{Z}/2\mathbb{Z}=\mathbb{F}_2$.  Note that the splitting field of $x^8-x$ over $\mathbb{F}_2$ is $\mathbb{F}_{2^3}$.  Therefore, $x^8-x=x(x-1)\,q(x)\,r(x)$ for some irreducible polynomials $q(x),r(x)\in\mathbb{F}_2[x]$ of degree $3$.  From here, we can easily see that, without loss of generality,
$$q(x):=x^3+x+1\text{ and }r(x):=x^3+x^2+1\,.$$
Thus, if $f(x)+\langle x^7+1\rangle \in\mathbb{F}_2[x]/\langle x^7+1\rangle$ is idempotent, then
$$f(x)\,\big(f(x)-1\big)=\big(f(x)\big)^2-f(x)$$
is divisible by
$$x^7+1=p(x)\,q(x)\,r(x)\,,$$
where $p(x):=x-1=x+1$.  Thus, there are $2^3=8$ possible polynomials $f(x)$ modulo $x^7+1$ that works, depending on the subset $S\subseteq \big\{p(x),q(x),r(x)\big\}$ which contains the factors that divides $f(x)$ such that $f(x)-1$ is divisible by the factors that are in $\big\{p(x),q(x),r(x)\big\}\setminus S$.  Here is the list of all of them (found using the Chinese Remainder Theorem):


*

*for $S=\emptyset$, $f(x)=1$;

*for $S=\big\{p(x)\big\}$, $f(x)=x^6+x^5+x^4+x^3+x^2+x$;

*for $S=\big\{q(x)\big\}$, $f(x)=x^4+x^2+x$;

*for $S=\big\{r(x)\big\}$, $f(x)=x^6+x^5+x^3$;

*for $S=\big\{p(x),q(x)\big\}$, $f(x)=x^6+x^5+x^3+1$;

*for $S=\big\{r(x),p(x)\big\}$, $f(x)=x^4+x^2+x+1$;

*for $S=\big\{q(x),r(x)\big\}$, $f(x)=x^6+x^5+x^4+x^3+x^2+x+1$; 

*for $S=\big\{p(x),q(x),r(x)\big\}$, $f(x)=0$.


(Observe that the four polynomials in the bottom of the list are obtained from the four polynomials in the top of the list by adding $1$, so you need to determine only four of the polynomials.)
A: Key Idea $ $ For $f\in {\rm UFD}\, R,\,$ idempotents $\,e\in R/f\,$ correspond to coprime splittings of $\,f\,$ since
$$e^2=e\ \,{\rm in}\,\ R/f\iff f\mid e(1-e)\iff f = gh,\,  g\mid e,\,h\mid 1-e\qquad$$
In OP $\,f = (x\!+\!1)(x^3\!+\!x\!+\!1)(x^3\!+\!x^2\!+\!1)$ is a product of $\,\color{#c00}3\,$ primes yielding $2^{\large \color{#c00}3}$ such splittings (whose associated idempotents are easily computable by CRT as here, e.g. by solving the system $\,e\equiv 0\pmod{\!x\!+\!1},\ e\equiv 1\pmod{\!f/(x\!+\!1)}\,$ etc.
