Skip to main content
3 of 3
Typo
LSpice
  • 12.9k
  • 4
  • 45
  • 69

A monic polynomial of degree $3$ has this form if and only if its value at $1$ is $u$. So this is just the number of products of three monic linear factors whose value at $1$ is $u$. For each $\alpha \in \mathbb F_p$, there is a unique monic linear polynomial whose value at $1$ is $\alpha$, so this is equivalent to asking the number of unordered triples of elements of $\mathbb F_p$ whose product is $u$.

The orbit-counting theorem tells us that the number of unordered triples whose product is $u$ is $\frac{1}{6}$ times the sum over $\sigma \in S_3$ of the number of ordered triples fixed by $\sigma$ whose product is $u$. For $\sigma=1$ this is just the number of triples whose product is $u$, which is $(p-1)^2$. For $\sigma$ a transposition this is the number of solutions to $\alpha \beta^ 2 =u$, which is $p-1$ since each $\beta \neq 0$ determines a unique $\alpha$. For $\sigma$ a $3$-cycle this is the number of cube roots of $u$ which is $$c_u = \begin{cases} 1 & \textrm{if } p\not\equiv 1\bmod 3 \\ 0 & \textrm{if } u \notin \{\alpha^3 \mid \alpha\in \mathbb F_p\} \\ 3 & \textrm{if } p \equiv 1\bmod 3 \textrm{ and } u \in \{\alpha^3 \mid \alpha\in \mathbb F_p\} \end{cases} $$ so the total number is

$$\frac{ (p-1)^2 + 3 (p-1) + 2 c_u }{6}.$$

Will Sawin
  • 148.4k
  • 9
  • 324
  • 563