Is there a mathematical statement that is linking integer limits to real limits?
I saw a question asking for the limit
$$\lim_{n \to \infty}\frac{\tan(n)}{n}.$$
At first I thought that the limit assumed $n$ to be a real number. So I gave the advice to use $\pi/2+2\pi k$ and $2\pi k$ as two sequences with different limits. The real limit for $x\to \infty$, in which $x \in \mathbb{R}$, is much easier to handle than the limit $n \to \infty$, in which $n \in \mathbb{N}$.
Here is my question:
Is there a mathematical theorem that is linking the integer limit $$\lim_{n\to \infty}f(n)$$ to the real limit $$\lim_{x\to\infty}f(x)?$$
Is the equidistribution theorem such a mathematical statement?
The equidistribution theorem is a useful tool for proving that some limits over $\mathbb{N}$ (do not) exist or some series are (not) converging, but in general $\lim_{n\to +\infty}f(n)$ may exist even if $\lim_{x\to +\infty}f(x)$ does not: just take $f(x)=\sin(\pi x)$. On the other hand, it is trivial that $\lim_{x\to +\infty}f(x)=C$ implies $\lim_{x\to +\infty}f(n)=C$. In our case $\lim_{x\to +\infty}f(x)$ does not exist and neither it does $\lim_{n\to +\infty} f(n)$, but that is tricky. Take a convergent $\frac{p_k}{q_k}$ of the continued fraction of $\frac{\pi}{2}$ with $q_k$ being odd: we have $$ \left| \frac{p_k}{q_k}-\frac{\pi}{2} \right|\leq \frac{1}{q_k^2}, $$ hence $|\sin(p_k)|$ is less than $\frac{1}{q_k}$ apart from $1$ and $\cos(p_k)$ is less that $\frac{1}{q_k}$ apart from zero, hence if $q_k$ is big enough we have $\left|\frac{\tan(p_k)}{p_k}\right|\geq\frac{1}{2}$, so $\limsup_{n\to +\infty}|f(n)|\geq\frac{1}{2}$. With the same technique we may also find a subsequence proving $\liminf_{n\to +\infty} |f(n)|\leq \frac{1}{3}$, so the limit does not exist.
If a function $f$ is continuous, then for any sequence $x_n\to x_0$, $$\lim_{x_n\to x_0} f(x_n)=f(x_0),$$ and in particular if $x_0=\infty$, $$\lim_{n\to\infty}f(n)=\lim_{x\to\infty}f(x)$$ for real $x$ and natural $n$. However this is not the case since $\tan$ is not continuous, and in fact it does not even make sense to say $$\lim_{x\to\infty}\frac{\tan x}{x}$$ because this is only definied if all sequences converging to infinity give the same limit.
So in short, yes, you have to use natural numbers, which does make the question more difficult but also more interesting.
In fact I am starting to think that the limit does not exist in this case either, since the decimal expansion of $\pi/2$ has arbitrarily long sequences of zeros (I don't know if this is even known?), and so $\tan n$ becomes arbitrarily large. But I may be wrong.
EDIT: I'm sorry I just realized Jack D'Aurizio answered that beautifully.