Pointwise convergence of sequence $(f_n)_n$ of functions to $f$ and changing limits

Let $(f_n)_{n \geq 1} : \mathbb{R} \to \mathbb{R}$ be defined as $f_{2n} = \chi_{[2n,+\infty)}$ and $f_{2n-1} = \chi_{(-\infty, 2n-1]}$. Now, if $x \in \mathbb{R}$, there exists $k \in \mathbb{N}$ such that $x \in [-k,k]$ and so if $n \geq k$, we have that $f_n(x) = 0$. Therefore we have pointwise convergence.

Moreover, if $a = \infty$ and $n \in \mathbb{N}$, then $\lim_{x \to \infty}f_n(x)$ always exists,

$$ \lim_{x \to \infty}f_n(x) = \cases{0 \quad n \text{ is odd} \\ 1 \quad n \text{ is even}} $$

However, it is clear from here that $(L_n)_{n\geq 1}$ does not converge, singe taking odd and even terms we have two subsequences converging to different values.

As a side note, a sufficient condition for $(2)$ to hold is that $a \in \mathbb{R}$ and $f_n$ continuous at $a$ for all $n$, in which case $L_n \to f(a)$. If so, we would have that

$$ |f(a) - L_n| \leq |f(a) - f_n(a)| + |f_n(a)-f_n(x)| + |f_n(x) - L_n| $$

Taking limit of $x \to a$, we have that

$$ |f(a) - L_n| \leq |f(a) - f_n(a)| \xrightarrow{n \to \infty} 0 $$

as claimed.


Hint for 2: consider $f_n$ to be tent-shaped around $a=0$, where the slope of the tent gets higher with $n$. Spoiler below:

Explicitly, take $f_n$ to be zero except for $x\in (0,\frac1n)$, where $f_n$ has slope $-n^2$, and $x\in(-\frac1n,0)$, where $f_n$ has slope $n^2$. Let $f_n(0)=0$ for every $n$, so $f_n$ has a removable discontinuity at $x=0$. Argue that $f_n(x)\to0$ for every $x$. But for each $n$ we have $\lim_{x\to0}f_n(x)=n=:L_n$, and $L_n$ doesn't converge.


Let $\{q_1,q_2,\dots\}$ be an ordering of $\mathbb{Q}$. Define $f : \mathbb{Q} \to \mathbb{R}$ as follows: $$f_n(x)=\begin{cases} 0 &: x\in \{q_i : 1 \leq i \leq n\}\\ n &: \text{otherwise}\end{cases}$$ Then, $\{f_n\}$ converges to $0$ pointwise and for $a=0$, $L_n=n \, \forall n \in \mathbb{N}$. Clearly, it contradicts $2$.