TITLE: Can we make $\tan(x)$ arbitrarily close to an integer when $x\in \mathbb{Z}$?
QUESTION [23 upvotes]: My 7-year-old son was staring at the graph of tan() and its endlessly-repeating serpentine strokes on the number line between multiples of $\pi$ and he asked me the question in the title.  More precisely, is the following true or false?
For any $\epsilon > 0$, there exists some $N \in \mathbb{Z}^+$ such that 
$|\tan(N)-\lfloor \tan(N) \rceil| < \epsilon$.

REPLY [8 votes]: Fairly random (and definitely unrelated) web surfing turned up this nice short paper of Cheng and Zheng which proves in a very constructive way that if $f: \mathbb{R} \rightarrow \mathbb{R}$ is any continuous function which is periodic with irrational period, then $f(\mathbb{N})$ is dense in $f(\mathbb{R})$.  
The ideas are first exhibited with respect to the function $f(x) = \sin x$.
Your question is not literally a special case of this, since $\tan x$ is not continuous on all of $\mathbb{R}$.  Nevertheless I think it is close enough for the same methods to be carried over.  (For instance, $\tan x$ can be viewed as a continuous function with values in $\mathbb{R} \mathbb{P}^1 \cong S^1$.)  In any case the relation here is close enough so that I thought the paper would be of interest to readers of this question.