# Real Analysis: Sequences

## Sequences

### Sequences

sequence is a function of the natural numbers. Sequences have special notation: if a sequence is given by some function $f : \mathbb{N} \rightarrow X$, we write it as $\{a_n\}$, where $a_n = f(n)$. In fact, we never use the regular function notation $f(n)$ and instead simply write the formula for the $n$th value in place of $a_n$. For example, the sequence of even natural numbers can be written neatly as $\{2n\}$, the sequence of odd natural numbers as $\{2n + 1\}$, and the sequence of square natural numbers as $\{n^2\}$. We can also list the first few elements of the sequence when the pattern is clear. For example, the even numbers we can simply write as $0, 2, 4, 6, \ldots$.

Sequences do not need to be expressible algebraically. For example, if we take $\{a_n\}$ to be the sequence of primes, then $a_0 = 2$, $a_1 = 3$, $a_2 = 5$, $a_3 = 7$, and so on. Any function of $\mathbb{N}$ is a sequence.

### Sequences of Real Numbers

While the codomain of a sequence may be any set whatsoever, real analysis is of course focused on sequences of real numbers. The general definition in terms of arbitrary sets given above is still useful, though, since it shows us that sequences the essence of sequences generalizes beyond sequences of real numbers. For example, the above definition allows us to consider sequences of elements of $\mathbb{R}^n$. However, for now we will only be interested in sequences of real numbers unless stated otherwise.

### Alternate Domains

Sequences are often defined as a function of $\mathbb{N}^+$, the positive natural numbers. In truth, the starting point is typically of little interest, as the study of sequences is concerned with what happens at the "tail" of the sequence as the index grows towards infinity. Don't be surprised to see the sequence of primes written instead starting with $a_1 = 2$, or the sequence $\left\{\frac{1}{n}\right\}$ implicitly starting with $a_1 = 1$.

### Subsequences

Given a sequence $\{a_n\}$, we can construct a new sequence by selecting an infinite subset of elements from $\{a_n\}$. This subset we naturally call a subsequence. Formally, if $\{n_k\}$ is a subset of $\mathbb{N}$ where $n_0 < n_1 <\ldots$, then $\{a_{n_k}\} = a_{n_0}, a_{n_1}, \ldots$ is a subsequence of $\{a_n\}.$ For example if we take the sequence $\{(-1)^n\} = 1, -1, 1, -1, \ldots$ and index it by the sequence $\{2n\} = 0, 2, 4, \ldots$, we get the subsequence of $(-1)^0, (-1)^2, (-1)^4, \ldots = 1, 1, 1, \ldots.$ Likewise, if we take $\{a_n\}$ to instead be the sequence of prime numbers starting with $a_1 = 2$ and index it by $\{3n\}$, we get every third prime number: $5, 13, 23, 37 \ldots.$

This section will focus on some examples of sequences, and the next sections will focus on the interesting properties of sequences.

## Problems

1. Write out the first 8 terms of each sequence:

1. $\{n^2\}$

2. $\{\frac{n+1}{n}\}$

3. $\left\{\frac{(-1)^{n}}{n+(-1)^{n+1}}\right\}$

1.

$\begin{array}{l|l} n & a_n \\ \hline 1 & 1 \\ 2 & 4 \\ 3 & 9 \\ 4 & 16 \\ 5 & 25 \\ 6 & 36 \\ 7 & 49 \\ 8 & 64 \\ \end{array}$

2.

$\begin{array}{l|l} n & a_n \\ \hline 1 & 2 \\ 2 & \dfrac{3}{2} \\ 3 & \dfrac{4}{3} \\ 4 & \dfrac{5}{4} \\ 5 & \dfrac{6}{5} \\ 6 & \dfrac{7}{6} \\ 7 & \dfrac{8}{7} \\ 8 & \dfrac{9}{8} \\ \end{array}$

3.

$\begin{array}{l|l} n & a_n \\ \hline 1 & \dfrac{-1}{2} \\ 2 & 1 \\ 3 & \dfrac{-1}{4} \\ 4 & \dfrac{1}{3} \\ 5 & \dfrac{-1}{6} \\ 6 & \dfrac{1}{5} \\ 7 & \dfrac{-1}{8} \\ 8 & \dfrac{1}{7} \\ \end{array}$

2. Consider the sequence $\{\frac{1}{2^n}\}$. Write the closed form for the subsequence indexed by the sequence $\{3n\}$ and write out the first fives values.

The closed form of the subsequence is $\{\frac{1}{2^{3n}}\}$. The first five values are $\{1, \frac{1}{8}, \frac{1}{64}, \frac{1}{512}, \frac{1}{4096}\}$.

3. The Fibonacci sequence is an ancient sequence of numbers dating back over 2,000 years. It is a recursive sequence, i.e. one where subsequence elements are a function of previous elements. Its values are defined as follows:

$F(n) = \left\{ \begin{array}{ll} 0 & n = 0 \\ 1 & n = 1 \\ F(n-1) + F(n-2) & n \geq 2 \\ \end{array} \right.$

List out the first 10 elements of the Fibonacci sequence.

$\begin{array}{ll} n & F(n) \\ 0 & 0 \\ 1 & 1 \\ 2 & 1 \\ 3 & 2 \\ 4 & 3 \\ 5 & 5 \\ 6 & 8 \\ 7 & 13 \\ 8 & 21 \\ 9 & 34 \\ 10 & 55 \end{array}$

4. A sequence of nonempty intervals $\{I_n\}$ is called a nested sequence of intervals if it has the following two properties:

• $I_{n+1} \subseteq I_n$ for all $n \in \mathbb{N}.$

• For all $\varepsilon > 0$, there exists an $N \in \mathbb{N}$ such that $\mu(I_n) < \varepsilon$, where $\mu(I) = \sup(I) - \inf(I).$

Prove the following:

Nested Interval Theorem: If $\{I_n\}$ is a sequence of nested intervals, then $\bigcap\limits_{n=0}^{\infty} I_n$ is nonempty and contains exactly one value.

First we show the intersection is nonempty. Proof by contradiction. Assume that $\bigcap\limits_{n = 0}^{\infty} I_n$ is empty. Then there are at least two sets $I_j$ and $I_k$ where $j < k$ such that $I_j \cap I_k = \varnothing$. But this is a contradiction, since neither set is empty and $I_j \supseteq I_k$ implies that $I_j \cap I_k = I_k$, and $I_k$ is again nonempty. Thus the intersection contains at least one value.

Now we show that there is only one value in the intersection. Assume there are two values $x$ and $y$ such that $x \neq y$ and both are in $\bigcap\limits_{n = 0}^{\infty} I_n.$ Let $\varepsilon = |x - y|$. Then there is some $N \in \mathbb{N}$ such that $\mu(I_N) < \varepsilon$. Without loss of generality, assume $x \in I_N$. If $y > x$, then $y = x + |x - y| > \sup(I_N)$. If instead $y < x$, then $y = x - |x - y| < \inf(I_N)$. In either case $y \notin I_N$, which is a contradiction. Therefore there cannot be more than one value in the intersection. Thus there is exactly one.