Limit superior (source code)

= Limit superior
{title2=$\limsup$}
{wiki}

The limit superior of a real <sequence> is
$$
\limsup_{n\to\infty}a_n=\inf_N\sup_{n\geq N}a_n,
$$
allowing a value in the <extended real number line>. For a finite value $U$, every $\varepsilon>0$ gives an eventual upper bound $a_n<U+\varepsilon$, while arbitrarily late terms still satisfy $a_n>U-\varepsilon$. The second condition concerns recurrence at arbitrarily large indices, not the fraction of indices where a large value occurs.

In <limit inferior and limit superior>, $a_n=(-1)^n(1+1/n)$ has <limit superior> one because its positive branch approaches one from above and all later values eventually stay below $1+\varepsilon$. Changing any finite number of terms leaves the <limit superior> unchanged: once the <tail of a sequence> begins beyond those positions, all its <suprema> are the same as before. The <sparse peaks can determine a limit superior> example shows that even a <set> of peak indices with zero <natural density> can decide the upper long-run edge.