Suppose that $R$ is a commutative ring with unity such that for each $a \in R$ there is a positive integer $n$ greater than 1 such that $a^n=a$. Prove that every prime ideal of $R$ is a maximal ideal of $R$.
My attempt: Let $I$ be a prime ideal and assume $A$ is an ideal of $R$ that contains $I$. Let $a \in I$. Then $a^n \in I$ also and so $a + a^n = a( a^{n-1}+1) \in I$.
Since $a \in I$ and $I$ is a prime ideal, $a^{n-1} +1 \notin I$, but $a^{n-1}+1 \in A$. This implies $a^n \in A$ and $1 \in A$. Since $1 \in A$, we must have $A = R$. Since $I$ is properly contained in $A =R$, the prime ideal $I$ must be maximal.