Problem

Source: Polish MO Finals P5 2023

Tags: number theory, modular congruences, Modular inverse



Give a prime number $p>2023$. Let $r(x)$ be the remainder of $x$ modulo $p$. Let $p_1<p_2< \ldots <p_m$ be all prime numbers less that $\sqrt[4]{\frac{1}{2}p}$. Let $q_1, q_2, \ldots, q_n$ be the inverses modulo $p$ of $p_1, p_2, \ldots p_n$. Prove that for every integers $0 < a,b < p$, the sets $$\{r(q_1), r(q_2), \ldots, r(q_m)\}, ~~ \{r(aq_1+b), r(aq_2+b), \ldots, r(aq_m+b)\}$$have at most $3$ common elements.