Problem

Source: BdMO 2022 Secondary P6

Tags: number theory



About $5$ years ago, Joydip was researching on the number $2017$. He understood that $2017$ is a prime number. Then he took two integers $a,b$ such that $0<a,b <2017$ and $a+b\neq 2017.$ He created two sequences $A_1,A_2,\dots ,A_{2016}$ and $B_1,B_2,\dots, B_{2016}$ where $A_k$ is the remainder upon dividing $ak$ by $2017$, and $B_k$ is the remainder upon dividing $bk$ by $2017.$ Among the numbers $A_1+B_1,A_2+B_2,\dots A_{2016}+B_{2016}$ count of those that are greater than $2017$ is $N$. Prove that $N=1008.$