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.

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
