I have some trouble with the following exercise:
Let $R$ be a finite commutative ring s.t. $|R| = k$. Assuming
$$ x^k-x=\prod_{r\in R}(x-r) \in R[x]$$ how can we prove that $R$ is a field and evaluate $\sum_{r\in R^*}^{}{r^2}$?
To do so, first I proved that $x^{k-1}-1=\prod_{r\in R^*}(x-r)$. But then using elementary symmetric polynomial I had to prove that
$$\sum_{r\in R^*}^{}{r}=0 \text{ and } \prod_{r\in R^*}^{}{r}=(-1)^k.$$
I tried to evaluate every $e_i$ for the $k-1$ elements of $R^*$ but I'm not sure about how I can proceed and don't really see how it can help to compute $\sum_{r\in R^*}^{}{r^2}$.
Thanks in advance for any help it would be a lot appreciated. Best wishes.
For any $r_0 \in R^*$, $$r_0 \left((-1)^k\prod_{r\in R^*\setminus \{r_0\}} r\right) = (-1)^k\prod_{r \in R^*} r = 1,$$ so $r_0$ is invertible with $r_0^{-1} = (-1)^k\prod_{r\in R^*\setminus \{r_0\}} r$. Therefore $R$ is a field.
For the other question, we can note that (since $R^*$ is closed under the bijection $x \mapsto -x$) $$(x^{k-1}-1)^2 = \left(\prod_{r \in R^*} (x-r)\right)\left(\prod_{r \in R^*} (x+r)\right) \\ x^{2k-2} - 2x^{k-1} + 1 = \prod_{r \in R^*} (x^2-r^2)$$ so $-\sum_{r \in R^*} r^2$ is the coefficient of $x^{2k-4}$ in $x^{2k-2} - 2x^{k-1} + 1$.
To answer this, we have some cases
If $k-1 = 2k-4 \iff k=3$, then $\sum_{r\in R^*} r^2 = 2$.
If $0 = 2k-4 \iff k=2$, then $\sum_{r\in R^*} r^2 = -1$
Otherwise, $\sum_{r\in R^*} r^2 = 0$.