Suppose $x\to x^n$ is a ring homomorphism from $R$ to $R$, a commutative ring with unity. DoEs it imply that $R$ has characteristic $n$ (which is prime)?
If this map is a ring homomorphism for some ring R whose characteristic $m$ does not divide $n$, then the restriction to Z/mZ is also a ring homomorphism. So it's enough to check if the identity holds in any such ring.
I suspect this is not all that hard to check if you just set some variables to to one and so forth and see what happens although I'm not sitting down in front of a piece of paper right now to check it myself