2.2 Sequences of real numbers

Intuitively, a sequence is an ordered list of real numbers (a1,a2,a3)(a_{1},a_{2},a_{3}\dots), where ana_{n}\in\mathbb{R} for all nn\in\mathbb{N}. A more precise way to describe this is through the language of functions.

Definition 2.1.

A (real) sequence is a function a:a\colon\mathbb{N}\to\mathbb{R}.

Given nn\in\mathbb{N}, recall that the value of a function a:a\colon\mathbb{N}\to\mathbb{R} at nn is usually written as a(n)a(n). However, sequences are almost always written using the subscript notation an:=a(n)a_{n}:=a(n), where ana_{n} is referred to as the nnth term of the sequence. The full sequence is then expressed using the notation (an)n(a_{n})_{n\in\mathbb{N}}.

Example 2.2.

Some standard examples of sequences are (1/n)n(1/n)_{n\in\mathbb{N}}, (n)n(n)_{n\in\mathbb{N}}, ((1)n)n((-1)^{n})_{n\in\mathbb{N}}. If we write out the terms explicitly, we see that

  • (1/n)n=(1,1/2,1/3,1/4,),(1/n)_{n\in\mathbb{N}}=(1,1/2,1/3,1/4,\dots),

  • (n)n=(1,2,3,4,)(n)_{n\in\mathbb{N}}=(1,2,3,4,\dots),

  • ((1)n)n=(1,1,1,1,)((-1)^{n})_{n\in\mathbb{N}}=(-1,1,-1,1,\dots).

Since a sequence (an)n(a_{n})_{n\in\mathbb{N}} is just a function, one way to visualise it is by drawing its graph. We illustrate the sequences from Example 2.2 in Figure 2.1. As we shall see in the next subsection, the graphical representation of a sequence can help us to understand some of its properties.

(1/n)n(1/n)_{n\in\mathbb{N}}
(n)n(n)_{n\in\mathbb{N}}
((1)n)n((-1)^{n})_{n\in\mathbb{N}}
Figure 2.1: Graphs of the three sequences from Example 2.2. The scales differ between plots.
Example 2.3.

We can also consider the sequence (0,0.3,0.33,0.333,)(0,0.3,0.33,0.333,\dots) from our earlier discussion of decimal expansions. If we denote this sequence by (an)n(a_{n})_{n\in\mathbb{N}}, can we write a neat formula for a general term ana_{n}? If we set a1:=0a_{1}:=0, we can express the remaining terms by either of the following formulæ:

an:=0.33n1 digitsoran:=k=1n1310kfor all n with n2.a_{n}:=0.\underbrace{3\cdots 3}_{n-1\text{ digits}}\qquad\text{or}\qquad a_{n}% :=\sum_{k=1}^{n-1}\frac{3}{10^{k}}\qquad\text{for all $n\in\mathbb{N}$ with $n% \geq 2$.}

For the sequence (1,1.4,1.41,1.414,)(1,1.4,1.41,1.414,\dots) arising from the decimal expansion of 2\sqrt{2}, it is harder to write down some kind of formula for the terms of the sequence. Nevertheless, by developing our theoretical tools, we shall still be able to say a lot about this sequence.

We emphasise that the sequence (an)n(a_{n})_{n\in\mathbb{N}} is not the same as the set {an:n}\{a_{n}:n\in\mathbb{N}\}, since the latter does not encode the ordering of the terms. Moreover, {an:n}\{a_{n}:n\in\mathbb{N}\} corresponds to the image of (an)n(a_{n})_{n\in\mathbb{N}} interpreted as a function.

Example 2.4.

If we let an:=(1)na_{n}:=(-1)^{n} for all nn\in\mathbb{N}, then the sequence (an)n(a_{n})_{n\in\mathbb{N}} is an infinite ordered list (1,1,1,1,)(-1,1,-1,1,\dots) alternating between 1-1 and 11. The set {an:n}={1,1}\{a_{n}:n\in\mathbb{N}\}=\{-1,1\} just consists of the two possible values of the terms of the sequence.

Another way to visualise (an)n(a_{n})_{n\in\mathbb{N}} is to simply plot each point ana_{n}\in\mathbb{R} in the real number line. Here it is helpful to label the points in the plot a1a_{1}, a2a_{2}, a3a_{3}, and so on, so that the ordering is apparent in the diagram: see Figure 2.2.

(1/n)n(1/n)_{n\in\mathbb{N}}
(n)n(n)_{n\in\mathbb{N}}
((1)n)n((-1)^{n})_{n\in\mathbb{N}}
Figure 2.2: Point plots of the three sequences from Example 2.2.

This kind of plot is especially useful if the terms of the sequence are distinct, as in the case for (1/n)n(1/n)_{n\in\mathbb{N}} or (n)n(n)_{n\in\mathbb{N}}. If many terms of the sequence coincide, as is the case for ((1)n)n((-1)^{n})_{n\in\mathbb{N}}, then this kind of plot tends to obscure some of the information.

Exercise 2.5.

From elementary arithmetic, we know for each nn\in\mathbb{N}, there exists a unique qn0q_{n}\in\mathbb{N}_{0} and rn{0,1,2,3,4}r_{n}\in\{0,1,2,3,4\} such that n=5qn+rnn=5q_{n}+r_{n} (in particular, rnr_{n} is the remainder when we divide nn by 55). Sketch the graphs of the following sequences:

  1. (i)

    (qn)n(q_{n})_{n\in\mathbb{N}};

  2. (ii)

    (rn)n(r_{n})_{n\in\mathbb{N}};

  3. (iii)

    (rnqn+1)n\Big{(}\displaystyle\frac{r_{n}}{q_{n}+1}\Big{)}_{n\in\mathbb{N}}

Exercise 2.6.

Sketch the graph of the sequence (an)n(a_{n})_{n\in\mathbb{N}} where an:=11/na_{n}:=1-1/n if nn\in\mathbb{N} is even and an:=1/(n+1)a_{n}:=1/(n+1) if nn\in\mathbb{N} is odd.

Another way to describe a sequence is to use a recursive definition. For this, we define the initial terms of the sequence and then describe a law for determining the nnth term of the sequence from earlier terms.

Example 2.7.

Here are some simple examples of recursively defined sequences.

  1. 1.

    The factorial sequence (n!)n(n!)_{n\in\mathbb{N}} can be defined recursively by setting

    a1:=1andan:=nan1for all n with n2.a_{1}:=1\quad\text{and}\quad a_{n}:=n\cdot a_{n-1}\quad\text{for all $n\in% \mathbb{N}$ with $n\geq 2$.}
  2. 2.

    The Fibonacci sequence (Fn)n(F_{n})_{n\in\mathbb{N}} is defined recursively by setting

    F1:=1,F2:=1andFn=Fn2+Fn1for all n with n3.F_{1}:=1,\quad F_{2}:=1\quad\text{and}\quad F_{n}=F_{n-2}+F_{n-1}\quad\text{% for all $n\in\mathbb{N}$ with $n\geq 3$.}
Exercise 2.8.

Compute the first 88 terms of the Fibonacci sequence.

Exercise 2.9.

The first few terms of the look and say sequence are given by

(1,11,21,1211,111221,312211,)(1,11,21,1211,111221,312211,\dots)

Why is this called the look and say sequence? What is the value of the next term?

Figure 2.3: The sequence (pn)n=(3,1,4,1,5,9,)(p_{n})_{n\in\mathbb{N}}=(3,1,4,1,5,9,\dots) where pnp_{n} is the nnth decimal digit of π\pi.

Hopefully the above examples start to give you a sense of the huge variety of sequences out there. We emphasise, in particular, that a sequence does not need to be described by a compact, algebraic formula. Correspondingly, the graph of a sequence does not need to look neat and orderly such as those in Figure 2.1. In Figure 2.3 we plot the sequence (pn)n=(3,1,4,1,5,9,)(p_{n})_{n\in\mathbb{N}}=(3,1,4,1,5,9,\dots) where pnp_{n} is the nnth decimal digit of π\pi. The graph looks messy and disordered, but it is still a perfectly valid sequence.