Show that: The continuous functions $f_{n,k}(x):=(\cos(k!\pi x))^{2n},0\leq x \leq 1$ satisfy the relation
$\lim_{k\to \infty}(\lim_{n\to \infty}f_{n,k}(x))=\begin{cases} 1, & \textit{if x is rational}\\0,&\textit{if x is irrational}\end{cases}$
on the interval $[0,1]$.
Usually I start doing this type of problem by plotting $f$ for some $n$ and $k$ but I can't seem to see a correlation between the plots and the limit of the function.
Anyways, here were my general ideas:
I was thinking that it is $1$ only if the argument of the cosine is an even multiple of $\pi$, meaning that, let's say $x=\frac{a}{b}$ for the rational case, then I was thinking that if $k$ is large enough a number in $k!$ cancels with $b$ leaving only $j!\pi a$ in the argument (where $j!$ is $k!$ without the $b$).
Similarly I was thinking that when $x$ is irrational then it wouldn't cancel with a number in $k!$, right? Meaning that the argument of the cosine is uneven, meaning not $1$.
And since all of it is to the power of $2n$, that would mean that for $\cos(k!\pi x)\neq 1$ the limit of $n\to \infty$ would be $0$, right?
Now, even if my argumentation were correct I don't know how to write it down mathematically correct.
Could anyone help me out here?