Problem

Source: Vietnam TST 2021 P6

Tags: number theory, prime numbers



Let $n \geq 3$ be a positive integers and $p$ be a prime number such that $p > 6^{n-1} - 2^n + 1$. Let $S$ be the set of $n$ positive integers with different residues modulo $p$. Show that there exists a positive integer $c$ such that there are exactly two ordered triples $(x,y,z) \in S^3$ with distinct elements, such that $x-y+z-c$ is divisible by $p$.