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.
 A: 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.  
A: Though one can verify this result by brute force calculation, one gains much more insight by examining the ring-theoretic structure governing the result. First, we have  factorizations
$\quad \smash[t]{(\color{#0a0}{\overbrace{n^3\!+\!n^2\!+\!n}^{\large m}})}(n\!-\!1)\, =\, n(n^3\!-1),\,$ and $\ G = \langle n\rangle =  \{1,n,n^2\}$ is a subgroup of $\,\Bbb Z/(n^3\!-1)\phantom{I^{I^{I^I}}}$
Chinese rem (CRT) $\,\Rightarrow\,  \Bbb Z/(n^3\!-1)\times \Bbb Z/n \,\cong\, \Bbb Z/n(n^3\!-1)\,\ $ by $\,\ (a,b)\to\, \color{#c00}{n^3} a + (1\!-\!n^3)\, b$
A ring hom is a group hom, therefore $\,(G,0)\to \color{#c00}{n^3}G \,$  remains a group in $\,R  = \Bbb Z/n(n^3\!-1),\,$ namely $\  n^3 G = {n^3}\{1,n,n^2\} = \{n^3,n^4,n^5\} = \{n^3,n,n^2\},\:$ since $\,\ n^4 = n\,$ in $\ \Bbb Z/(n^4\!-n)$
And, again, the image of $\ n^3 G \subset R\,$ remains a group in $\,R/\color{#0a0}m \,\cong\,\Bbb Z/\color{#0a0}m\ \ $ QED
