Problem

Source: 2020 USOMO 3, by Richard Stong and Toni Bluher

Tags: number theory, Hi



Let $p$ be an odd prime. An integer $x$ is called a quadratic non-residue if $p$ does not divide $x-t^2$ for any integer $t$. Denote by $A$ the set of all integers $a$ such that $1\le a<p$, and both $a$ and $4-a$ are quadratic non-residues. Calculate the remainder when the product of the elements of $A$ is divided by $p$. Proposed by Richard Stong and Toni Bluher