Suppose that R is a commutative ring with unity such that for each $a$ in $R$ there is an integer $n > 1\mid a^n =a$. Every prime ideal is maximal?

Hint :

Enough to prove $R/P$ is a field..

See that $R/P$ is already an integral domain and then see what would $r^n=r$ imply?

I repeat $R/P$ is integral domain...

Spoiler :

$r^n=r\Rightarrow r^n-r=0\Rightarrow r(r^n-1)=0\Rightarrow???$


I'll explain Praphulla Koushik's argument in more detail so that you can see what he is getting at. Let $R$ be a ring, and $\ast$ be the property you mentioned: namely that for any $a \in R$ there exists an $n > 1$ such that $a^n = a$.

Lemma 1: Let $S$ be an integral domain. If $S$ satisfies property $\ast$, then $S$ is a field.

Proof: $S$ is contained in a field $K$ (for example, its quotient field), in which every nonzero element of $S$ has an inverse. If $0 \neq a \in S$, we need to show that in fact $a^{-1} \in S$. By hypothesis $a^n = a$ for some $n > 1$, so $a(a^{n-1} - 1) = 0$. Since $a \neq 0$ and $S$ is an integral domain, we have that $a^{n-1} - 1 = 0$, or $a^{n-1} = 1$. Thus $aa^{n-2} = 1$. Since $n > 1$, you have $n - 2 \geq 0$, so $a^{-1} = a^{n-2}$ is in fact in $S$.

Lemma 2: If $\phi: R \rightarrow T$ is a surjective homomorphism of rings, and $R$ satisfies property $\ast$, then so does $T$.

Proof: Every element of $T$ takes the form $\phi(a)$ for some $a \in R$. By hypothesis every such $a$ is equal to $a^n$ for some $n > 1$. But then $\phi(a) = \phi(a^n) = \phi(a)^n$.

Now for the proof of the theorem. Let $R$ be a commutative ring with identity which satisfies property $\ast$. If $P$ is a prime ideal of $R$, then $R/P$ is a ring. The map $R \rightarrow R/P$ given by $a \mapsto a + P$ is a surjective homomorphism, so by Lemma 2, $R/P$ satisfies property $\ast$.

Also $R/P$ is an integral domain, and since it satisfies property $\ast$, it is a field by Lemma 1. Therefore $P$ is in fact a maximal ideal.