Monotone sequence (source code)

= Monotone sequence

A real sequence is increasing when $a_{n+1}\geq a_n$ and decreasing when $a_{n+1}\leq a_n$.

A <monotone sequence> has one of these directions for every index. Here increasing means nondecreasing and decreasing means nonincreasing: \b[equal successive terms are allowed]. Strict increase would require $a_{n+1}>a_n$ at every step, and strict decrease would require $a_{n+1}<a_n$. A constant <sequence> is both increasing and decreasing. These conventions are those of <Basic Analysis: Introduction to Real Analysis, Volume I by Jiří Lebl> (§2.1.1, Definition 2.1.9).

For $n\geq1$, the <sequence> $1-1/n$ increases toward one, while $1+1/n$ decreases toward one. Repeating each term gives the still increasing <sequence> $0,0,1/2,1/2,2/3,2/3,\ldots$. Plateaus do not obstruct the <bounded monotone sequence theorem>. Checking the sign of $a_{n+1}-a_n$ is often the simplest way to verify a direction; finding an <upper bound> or <lower bound> is a separate task.