If there exists $n>1$ such that $x^n=x$ for all $x$ in a ring, then there are no nonzero nilpotent elements. Suppose that there is an integer $n> 1$ such that $x^n=x$ for all elements
$x$ of some ring. If $m$ is a positive integer and $a^m= 0$ for some a, show
that $a = 0$.
I have an answer but don't know if it is correct. I made use of the division algorithm to conclude that there exists $q$ and $r$ such that $a^n = a^{mq}a^{r}$ which will yield 
$a=(a^m)^q a^r$ then $a=0a^r$ finally, $a=0$ 
Is this right?   
 A: Your solution works when $n \geq m$ but if $m > n$ then we get $q = 0$ and so just get $a = a^r$.
However since $a^n = a$, we know $a^{n^2} = (a^n)^n = a$, and similiarly $a^{n^s} = a$ for all $s > 0$.
So pick $s$ such that $n^s \geq m$, then we can multiply $a^m = 0$ by $a^{n^s-m}$ to get $a^{n^s} = 0 a^{n^s-m}$ and so $a = 0$. (Or use your solution, but this is easier).
p.s. I'm assuming there's a typo in the question and it should be $n > 1$.
A: We can make it a little easier with a simplification.
Suppose $a\neq 0$ and let $m$ be minimal with respect to satisfying $a^m=0$. This implies that $m\geq 2$.

If there is a nonzero nilpotent element, then there's a nonzero element whose square is zero. 

If $a^2=0$ then there is nothing to do, and if $m>2$, we can always choose a power $a^i=b$ such that $b^2=0$ with $b\neq 0$.

If $b\neq0$ and $b^2=0$, we have a contradiction.

Of course, $n\geq 2$ by hypothesis. Also by hypothesis, $x=x^n=x^2x^{n-2}$ for all $x$. But this implies $b=b^n=0$, a contradiction to the assertion that $b\neq 0$. 

Thus there cannot exist such a $b$ with square zero, and moreover there cannot exist a nonzero nilpotent element $a$.

