<s>[INST] Number of solutions to $x^{3^{n+1}+1} = 1$ in a field of order $3^{2n+1}$ Let $F$ be a field such that $|F|=3^{2n+1}$ and $r=3^{n+1}$. I want to find the number of $x\in F$ that satisfies the equation $x^{r+1}=1$.
 [/INST] Say we want to count the solutions to $x^k=e$ in a cyclic group of order $m$. We may as well write everything additively and work in $\mathbb{Z}/m\mathbb{Z}$. Writing $\overline{k}=k/\gcd(m,k)$ and $\overline{m}=m/\gcd(m,k)$,
$$kx\equiv 0~\bmod m ~\iff~ \overline{k}x\equiv 0\bmod\overline{m} ~\iff~ x\equiv 0\bmod \overline{m}$$
The first $\Leftrightarrow$ follows from dividing/multiplying by $\gcd(m,k)$, and the second by multiplying by the inverse of $\overline{k}$ mod $\overline{m}$ (which exists since $\gcd(\overline{m},\overline{k})=1$). Therefore, the solutions $x$ mod $m$ are precisely $\ell\overline{m}$ for $0\le \ell<\gcd(m,k)$, of which there are $\gcd(m,k)$ many.
If $F$ is a field of order $3^{2n+1}$, then $|F^\times|=3^{2n+1}-1$ and with the Euclidean algorithm we may calculate the number of solutions to $x^{3^{n+1}+1}=1$ as
$$\begin{array}{ll} \gcd(3^{2n+1}-1,3^{n+1}+1) & =\gcd\big(3^{2n+1}-1-3^n(3^{n+1}+1)),3^{n+1}+1\big) \\ & = \gcd(-3^n-1,3^{n+1}+1) \\ & =\gcd(3^n+1,3^{n+1}+1) \\ & = \gcd\big(3^n+1,3^{n+1}+1-3(3^n+1)\big) \\ & = \gcd(3^n+1,-2) \\ & =2. \end{array}$$
</s>