modulo group defined by an algebraic relation I am asked if $\{n, n^{2}, n^{3}\}$ forms a group under multiplication modulo $m$ where $m = n + n^{2} + n^{3}.$
As an example we see that $\{2, 4, 8\}$ does form a group modulo $14,$ with identity $8,$ but am stuck starting the proof for the general case. Thanks in advance.

We work modulo $m=n+n^2+n^3$. Since $m|n^4-n$, we have that $n^4=n$. This implies* $n^3=1$, so $n^3$ is the identity. Also, when $x,y\in\{n,n^2,n^3\}=G$, we have $xy\in G$, because $xy=n^an^b=n^{a+b}=n^c$, where $c-1=a+b-1\mod 3$. Take for example $x=n^2$ and $y=n^3$. Then, $xy=n^5=n^4\cdot n=n\cdot n=n^2$. So in the exponent, we may subtract $3$ when it is at least $4$, making it the modulo $3$ remainder. (Note that we should take $n^3$ instead of $n^0$ here, since $n^3$ is already in our group.)
*this is not always true, but since we don't actually use that $n^3=1$ but only $n^4=n$, everything is fine.  
