Let $k$ be a positive integer such that $p = 8k + 5$ is a prime number. The integers $r_1, r_2, \dots, r_{2k+1}$ are chosen so that the numbers $0, r_1^4, r_2^4, \dots, r_{2k+1}^4$ give pairwise different remainders modulo $p$. Prove that the product \[\prod_{1 \leqslant i < j \leqslant 2k+1} \big(r_i^4 + r_j^4\big)\]is congruent to $(-1)^{k(k+1)/2}$ modulo $p$. (Two integers are congruent modulo $p$ if $p$ divides their difference.) Fedor Petrov
Problem
Source: IOM 2018 #3, Fedor Petrov
Tags: number theory, IOM
06.09.2018 08:37
This is essentially the same as the final example in Chapter 14 of PftB. Quote: If $p \equiv 3 \pmod{4}$ is a prime, then \[\prod_{1 \le x < y \le \tfrac{p-1}{2}} (x^2 + y^2) \equiv (-1)^{\left\lfloor \frac{p+1}{8} \right\rfloor}.\] (Note that if we let $p = 4k+3$, then actually $(-1)^{\left\lfloor \frac{p+1}{8} \right\rfloor} = (-1)^{k(k+1)/2}$, further cementing the resemblance.) Let $g$ be a generator modulo $p$; assume that $r_i \equiv g^{i-1}$ for all $1 \le i \le 2k+1$. Since $p \equiv 5 \pmod{8}$, $\{r_1^8, \dots, r_{2k+1}^8\}$ is also the set of nonzero eighth powers modulo $p$. Then the product \begin{align*} \prod_{1 \le i < j \le 2k+1} (r_i^4 + r_j^4) & \equiv \prod_{1 \le i < j \le 2k+1} (r_i^8 - r_j^8) \div \prod_{1 \le i < j \le 2k+1} (r_i^4 - r_j^4)\\ & \equiv \prod_{0 \le i < j \le 2k} (g^{8i} - g^{8j}) \div \prod_{0 \le i < j \le 2k} (g^{4i} - g^{4j})\\ & \equiv \prod_{0 \le i < j \le 2k} (h^{2i} - h^{2j}) \div \prod_{0 \le i < j \le 2k} (h^i - h^j) \end{align*}where $h = g^4$. This is equal to the sign of the permutation $x \to 2x$ ($0, 2, \dots, 2k, 1, 3, \dots, 2k-1$) on $\mathbb{Z}/(2k+1)\mathbb{Z}$. This permutation has $\tfrac{k(k+1)}{2}$ inversions, which solves the problem.