Problem

Source: Benelux Mathematical Olympiad 2015, Problem 1

Tags: algebra



Determine the smallest positive integer $q$ with the following property: for every integer $m$ with $1\leqslant m\leqslant 1006$, there exists an integer $n$ such that $$\dfrac{m}{1007}q<n<\dfrac{m+1}{1008}q$$.