I stumbled upon this "relation" (is the name correct?):
$$
\lim_{m \to \infty} \lim_{n \to \infty} \cos^{2n}(m! \pi x) = \begin{cases}
1,&x\text{ is rational}\\
0,&x\text{ is irrational}\end{cases}
$$
How is it called and why is it so? I'm really not asking for a proof since I fear it would be too complicated for me to understand, but rather for an "intuition".
Best Answer
The intuition is already almost the proof.
Thus $f(x):=\lim_{n\to\infty}\cos^{2n}(x)$ is a function that has value $0$ for all $x$, except that $f(x)=1$ if $\cos(x)=\pm1$, i.e. if $x$ is a multiple of $\pi$. After this, we see that multiplying the argument with $\pi$ is done to have the value $1$ at integers instead of multiples of $\pi$. Then the multiplication with $m!$ serves the purpose to obtain $1$ for any integer multiple of $\frac1{m!}$. As $m\to \infty$, this exhausts the rationals (and only them).