1

I'm stuck on this question too long, i'd like to get a clue or an idea for solution.

Let $R(p)$ be the remainder when the product $\prod_{x=0}^{p-1} (x^3 -3x +4)$ is divided by $p$. For example $R(11)=0$ and $R(29)=13$. Find the sum of $R(p)$ over all primes $p$ between $10^9$ and $1.1*10^9$

I programmed for low primes, and saw almost exact $\frac{2}{3}$ of the primes the product is zero. I tried to get rid of some primes, by finding a shorter formula for $p$, checking for rational root of the polynom (which doesnt exist) or checking which primes have roots mod $p$ for the polynom , as described here: How does Mathematica solve $f(x)\equiv 0\pmod p$? but it doesn't bring a solution for a general prime p

meni
  • 57

1 Answers1

7

Fix a prime $p > 3$. Denote $f(x) := x^3 - 3x + 4$ and $R = \prod_{t \in \mathbb{F}_p} f(t)$. We take two cases:

  1. If the polynomial $f$ is reducible over $\mathbb{F}_p$, then it must have a zero in $\mathbb{F}_p$. Thus, $R = 0$.
  2. Otherwise, if $f$ is irreducible over $\mathbb{F}_p$, then its roots $\alpha, \beta, \gamma$ must lie in $\mathbb{F}_{p^3}$. Observe that: $$\prod_{t \in \mathbb{F}_p} f(t) = -\prod_{t\in \mathbb{F}_p}(\alpha-t)(\beta-t)(\gamma-t) = (\alpha^p-\alpha)(\beta^p-\beta)(\gamma^p-\gamma)$$ We know that $\{\alpha, \beta, \gamma\} = \{\alpha^p, \beta^p, \gamma^p\}$, so $R$ is equal to a square root of the discriminant of $f$. One can calculate this to be $-324$, so we get $R = 18i$ (hehe) for a square root $i$ of $-1$. This still leaves you with the task of figuring out which square root of $-1$ to pick.
Haran
  • 11,978
  • 1
  • 19
  • 56
  • Thanks! Seems like you got it! Can u please explain what theorems you used in 1. f is irreducible over Fp , then its roots α,β,γ must lie in Fp3, and the equalities in .2? – meni Nov 13 '24 at 01:11
  • 1
    @meni This is field theory/galois theory of finite fields. If you've not studied it before, there isn't really a super quick summary that can be given that will be comprehensible. What do you know about finite fields? – Aaron Nov 13 '24 at 02:34
  • @Haran great answer! I got to this same point but I feel I am missing something obvious on how to pick the correct root, would you be able to provide a hint on this? I have implemented Tonelli-Shanks before so I can get both roots but I see no pattern on the choice of $x$ such that $x^2 = -1 \pmod{p}$ – Igor Jan 12 '25 at 08:50
  • @Haran thank you for the $\prod_{i=0}^{p-1} (i-x)\equiv -x^p + x\pmod{p}$. That helps much. Is this a known result? Thanks – Alexey Burdin Apr 25 '25 at 13:19