Can someone help with intuition behind this statement :
statement
Let $f : [0,1]\rightarrow \mathbb{R}$ be defined by:
$$f(x)=\begin{cases} 0 & x\notin \mathbb{Q} \\ \frac{1}{n} & \text{if} \, x=\frac{m}{n}\in \mathbb{Q} \end{cases} $$
If $x\in [0,1]$ \ $\mathbb{Q}$, then $f$ is continuous at $x$
Proof:
$\forall \varepsilon >0 \, \exists \, N : \frac{1}{N}<\varepsilon$, since $x\neq \frac{m}{n} \forall \, m,n \in \mathbb{N},$ there is some $\delta_k$ such that the interval $(x-\delta_k,x+\delta_k)$ has no points of the form $\frac{m}{k+1}$. let $\delta= \min\{\delta_1,...,\delta_{n-1}\}$. Then the interval $(x-\delta, x+\delta)$ contains no points of the form $\frac{m}{n}$ for $n=2,3,...,N$. Hence if $y\in (x-\delta,x+\delta), |f(y)-f(x)|=|f(y)-0|\leq \frac{1}{n}$ for $n\geq N+1$ so $|f(y)-0|<\varepsilon$ which proves that $f$ is continuous at $x.$
Question
Why does there exist a $\delta_k$ such that the interval has no points of the form $\frac{m}{k+1}$?
$x$ is irrational and also once we fix $k$, there are only finitely many $m$ that you can pick.
Hence if a neighborhood of $x$ is small enough, we can exclude those numbers of the form of $\frac{m}{k+1}$.