Question 4
Let $p\equiv2\pmod3$ be a prime, $k$ a positive integer and let $P(x)=3x^{(2p-1)/3}+3x^{(p+1)/3}+x+1$. For any integer $n$, let $R(n)$ denote the remainder when $n$ is divided by $p$ and let $S=\{0,1,\ldots,p-1\}$. At each step, you can either (a) replace every element $i$ of $S$ with $R(P(i))$ or (b) replace every element $i$ of $S$ with $R(i^k)$. Determine all $k$ such that there exists a finite sequence of steps that reduces $S$ to $\{0\}$.