Problem

Source: Pan African Olympiad 2009

Tags: number theory proposed, number theory



Let $x$ be a real number with the following property: for each positive integer $q$, there exists an integer $p$, such that \[\left|x-\frac{p}{q} \right|<\frac{1}{3q}. \] Prove that $x$ is an integer.