Given a prime number $p\ge 5$. Find the number of distinct remainders modulus $p$ of the product of three consecutive positive integers.
Problem
Source: 2022 CGMO Day1 P4
Tags: number theory
MathLover_ZJ
12.08.2022 09:55
It should be "CGMO"
lagrange001
12.08.2022 09:57
女奥…… 这么快……
Justanaccount
12.08.2022 10:04
Sorry, the statement is a bit unclear. From what I understand, let $S=\left\{i(i+1)(i+2) (mod p) | i=0,1,2,...,p-1\right\}$ and the problem asks us to find $|S|$, right?
MathLover_ZJ
12.08.2022 10:07
Yes.@above
Tintarn
12.08.2022 11:20
The answer is $\left\lfloor \frac{2p+1}{3}\right\rfloor$. Equivalently, we need to count the number of residues the polynomial $x^3-x$ takes modulo $p$.
For any value $a$ let $r(a)$ denote the number of residues $x$ such that $x^3-x \equiv a \pmod{p}$.
Clearly, $r(a) \in \{0,1,2,3\}$ for all $a$ and $\sum_a r(a)=p$.
For $r \in \{0,1,2,3\}$ let $N(r)$ denote the number of $a$ such that $r(a)=r$. So $N(1)+2N(2)+3N(3)=p$ and we are looking for $N(1)+N(2)+N(3)$.
The trick is to compute $\sum_a r(a)^2$ which is just $N(1)+4N(2)+9N(3)$. Note that this equals the number of solutions to $x^3-x \equiv y^3-y \pmod{p}$. We have the trivial solutions $x=y$ which contribute $p$. If $x \ne y$, we get $x^2+xy+y^2 \equiv 1 \pmod{p}$ and hence $(2x+y)^2+3y^2 \equiv 4 \pmod{p}$ with $x \ne y$. The contribution from $x=y$ is equal to $N(2)$, hence we get
\[N(1)+4N(2)+9N(3)=p-N(2)+N\]where $N$ is the number of solutions $(a,b)$ to $a^2+3b^2 \equiv 1 \pmod{p}$. But it is well-known and easy to prove that $N=p-\left(\frac{-3}{p}\right)$. Thus we have shown that
\[N(1)+9N(3)=2p-5N(2).\]Combining our two equations for $N(1)$ and $N(3)$ we finally find that
\[N(1)+N(2)+N(3)=\frac{2p+\left(\frac{-3}{p}\right)}{3}=\left\lfloor \frac{2p+1}{3}\right\rfloor.\]Remark: Note how miraculously $N(2)$ cancels out in the final computation. Of course we could have computed $N(2)$ directly as it is just the number of $a$ for which we have a double root. Easy to check that $N(2)=1+\left(\frac{3}{p}\right)$.
CANBANKAN
13.08.2022 07:06
The answer is $\frac{2p-1}{3}$ if $p\equiv 2(\bmod\; 3)$ and $\frac{2p+1}{3}$ otherwise.
Note $\sum\limits_{x=0}^{p-1} \left( \frac{4-3x^2}{p} \right) = -\left( \frac {-3}{p} \right)$.
One can show via QR or the equation $x^2+xy+y^2=0$ mod p to see that $\left( \frac {-3}{p} \right) \equiv p (\bmod\; 3)$.
Now, suppose $p\nmid x-y$ and $p\mid x^3-x-(y^3-y) \rightarrow p\mid x^2+xy+y^2-1$. This implies $(x+\frac y2)^2 = 4-3y^2$. Now group $0,\cdots,p-1$ into groups where each group satisfies $a^3-a$ constant, and our answer is just the number of groups (which is the size of the image of $a^3-a$)
We now casework on $\left( \frac {-3}{p} \right), \left( \frac {3}{p} \right)$
Case 1: $\left( \frac {-3}{p} \right) = -1 \left( \frac {3}{p} \right)= -1$
$\frac{p+1}{6}$ groups of size 3, $\frac{p-1}{2}$ groups of size 1, total is $\frac{2p-1}{3}$
Case 2: $\left( \frac {-3}{p} \right) = -1, \left( \frac {3}{p} \right)= 1$
$\frac{p-5}{6}$ groups of size 3, $\frac{p-3}{2}$ groups of size 1, 2 groups of size 2, total is $\frac{2p-1}{3}$
Case 3: $\left( \frac {-3}{p} \right) = 1 \left( \frac {3}{p} \right)= -1$
$\frac{p-1}{6}$ groups of size 3, $\frac{p+1}{2}$ groups of size 1, total is $\frac{2p+1}{3}$
Case 4: $\left( \frac {-3}{p} \right) = 1, \left( \frac {3}{p} \right)= 1$
$\frac{p-7}{6}$ groups of size 3, $\frac{p-1}{2}$ groups of size 1, 2 groups of size 2, total is $\frac{2p+1}{3}$
navi_09220114
07.09.2022 11:40
This generalizes APMO 2014 P3 lol