Let $R$ be a commutative ring. Show that $f(x)=a_0+a_1x+a_2x^2+\cdots+a_nx^n\in R[x]$ is nilpotent if and only if $a_0,a_1,a_2,\ldots,a_n$ are nilpotent.
Now since $f(x)$ is nilpotent then $f^n=0$ for some $n$. Now $f^2=c_0+c_1 x+\cdots+c_n x^n$ where $c_i=\sum _{k=0}^i a_k a_{i-k}$.
But how to write it for $f^n$? How to take it from here?
If $n_i$ be the least positive integer such that $a_i^{n_i}=0$ then what will the positive integer such that $a_i^n=0$ for all $i$??