Question concerning subsequences and continuity? Let $(x_n)_{n\in\mathbb N}$ be a sequence in $\mathbb R$ such that $x_n\to x\in\mathbb R$ and suppose $f:\mathbb R\longrightarrow \mathbb R$ a bounded function such that $(f(x_n))_{n\in\mathbb R}$ has a subsequence $(f(x_{n_k}))_{k\in\mathbb N}$ for which $f(x_{n_k})\to f(x)$. In this conditions, is it true that $f(x_n)\to f(x)$?

For each $n\in\mathbb{N}$, let $x_n=\frac{1}{n}$. Define $f:\mathbb{R}\to\mathbb{R}$ by $f(x)=\begin{cases}x^{-1}\mod 3 & \text{if }\exists n\in\mathbb{N}\text{ s.t. }x^{-1}=n \\ 0 & \text{otherwise}\end{cases}$. Clearly $f$ is bounded, and $(f(x_n))_{n\in\mathbb{N}}$ has the subsequence $\left(f\left(\frac{1}{3n}\right)\right)_{n\in\mathbb{N}}$ which converges to $f(0)=0$. However, the sequence $(f(x_n))_{n\in\mathbb{N}}$ does not converge.
