TITLE: Distance between a real number and a whole number
QUESTION [5 upvotes]: Prove that if $a$ is real and $n$ natural. The distance between one of the numbers $a,2a,3a,...,na$ and a whole number is  at most $\frac{1}{n}$.
This is a problem from discrete math, but hints from analysis would be appreciated.

REPLY [2 votes]: Any real $a$ can be written as $a=\lfloor a\rfloor+\{a\}$, where $\lfloor \cdot\rfloor$ is the greatest integer function and $\{a\}$ is the fraction part of $a$. Now note that $\{a\}\in[0,1)$ for any $a\in\mathbb{R}$. Partition the interval $[0,1)$ into $A_1,\cdots,A_n$ where $A_k=\left[\frac{k-1}{n},\frac{k}{n}\right)$ for $k\in\{1,\cdots,n\}$. Now $\{a\}$ must belong to one of these subintervals, say $A_i$. Then $\{xa\}\in\left[0,\frac{xi~mod~n}{n}\right)$. Now $\mathbb{Z}_n^*$, the nonzero elements of integers modulo $n$, is a multiplicative group. Hence for every integer $i\leq n,\exists~ x\leq n$ such that $xi\equiv1\mod n$. That is for some $x\leq n$, $xa$ is within a distance of $\frac{1}{n}$ from the integer $\lfloor x a\rfloor$ .