Tutorials › Real Analysis › Sequences as Functions

Sequences · Tutorial 151 of 1000

Sequences as Functions

Treating sequences as functions clarifies what their indices, terms, ranges, and equality mean.

Intermediate 9 min read

What You'll Learn

  • Define a real sequence as a function from the nonnegative integers to the real numbers
  • Identify a sequence’s terms as function values at particular indices
  • Distinguish the ordered sequence from the set of values in its range
  • Test equality of sequences by comparing their values at every index
  • Express boundedness of a sequence as boundedness of its range
  • Define pointwise sums and scalar multiples of real sequences

A Sequence Is a Function with an Index Set

The previous tutorial focused on choosing a valid route from assumptions to a conclusion. We now begin a new topic where that care with definitions remains essential: sequences. A sequence may look like a list of numbers, but its precise mathematical structure is a function. Thinking of it this way makes clear what counts as an input, what a term is, and when two sequences are equal.

Throughout this tutorial, the index set will be \(\mathbb{N}_0=\{0,1,2,\ldots\}\). This convention means the first term has index \(0\). Other courses sometimes start sequence indices at \(1\); either convention is possible, but the index set must be stated or understood. Here, a real sequence has one real value assigned to every nonnegative integer.

Definition: A real sequence is a function \(a:\mathbb{N}_0\to\mathbb{R}\). For an index \(n\in\mathbb{N}_0\), the value \(a(n)\) is called the term of the sequence at index \(n\). It is often written \(a_n\), so \(a_n=a(n)\).

The function has two parts that should not be confused: its domain \(\mathbb{N}_0\), which supplies the indices, and its values in \(\mathbb{R}\), which are the terms. A rule such as \(a(n)=3n-2\) specifies a sequence only when it is understood to apply to each index in the domain. In particular, it does not describe the value at an input outside that domain.

A sequence can be represented by its function rule, by listing initial terms, or by another definition that assigns a value at every index. A list of initial terms is usually only a partial view: it may suggest the rule, but finitely many terms do not by themselves specify all the remaining function values. The function viewpoint asks us to check that each allowed input receives exactly one output.

Worked Example: A Linear Rule on the Nonnegative Integers

Define \(a:\mathbb{N}_0\to\mathbb{R}\) by \(a(n)=3n-2\). Since the rule gives a real number for every \(n\in\mathbb{N}_0\), it defines a real sequence. Substituting the first indices gives

$$ a_0=3(0)-2=-2,\qquad a_1=3(1)-2=1,\qquad a_2=3(2)-2=4,\qquad a_3=3(3)-2=7. $$

Thus its initial terms are \(-2,1,4,7,\ldots\). The dots indicate that the sequence continues according to the same rule; they are not additional terms with specified indices. For example, \(a_5=3(5)-2=13\). The formula and the domain together determine every term.

The Range Is Not the Sequence

For a function \(a:\mathbb{N}_0\to\mathbb{R}\), its range is the set of values it takes:

$$ a(\mathbb{N}_0)=\{a(n):n\in\mathbb{N}_0\}. $$

The range records which values occur, but it does not record the order in which they occur or how many times each value occurs. A sequence contains that information because its terms are attached to particular indices. Consequently, two different sequences can have the same range.

Worked Example: Same Range, Different Sequences

Define \(b,c:\mathbb{N}_0\to\mathbb{R}\) by \(b(n)=(-1)^n\) and \(c(n)=(-1)^{n+1}\). Their first terms are

$$ b_0=1,\quad b_1=-1,\quad b_2=1,\quad b_3=-1, $$ $$ c_0=-1,\quad c_1=1,\quad c_2=-1,\quad c_3=1. $$

For every nonnegative integer \(n\), the value of each sequence is either \(1\) or \(-1\), and both values occur. Therefore \(b(\mathbb{N}_0)=c(\mathbb{N}_0)=\{-1,1\}\). Yet \(b_0=1\) while \(c_0=-1\), so the sequences are not equal. The common range loses the information about which value occurs at index \(0\).

Worked Example: A Value Can Occur at Several Indices

Define \(d:\mathbb{N}_0\to\mathbb{R}\) by \(d(n)=(n-2)^2\). Evaluating the rule at the first indices gives

$$ d_0=(0-2)^2=4,\quad d_1=(1-2)^2=1,\quad d_2=(2-2)^2=0,\quad d_3=(3-2)^2=1,\quad d_4=(4-2)^2=4. $$

The value \(1\) occurs at indices \(1\) and \(3\), and \(4\) occurs at indices \(0\) and \(4\). These repetitions are part of the sequence’s function values. The range is the set of nonnegative perfect squares, because \(n-2\) is an integer and, as \(n\) ranges over \(\mathbb{N}_0\), the squares obtained are \(0,1,4,9,\ldots\). In particular, the range does not record the repeated occurrences.

Equality Means Agreement at Every Index

Since a sequence is a function, equality of sequences is function equality. It is not enough for two sequences to have the same first few terms, nor is it enough for them to have the same range. They must assign the same value to every index in their common domain.

Theorem: Let \(a,b:\mathbb{N}_0\to\mathbb{R}\) be sequences. Then \(a=b\) if and only if \(a(n)=b(n)\) for every \(n\in\mathbb{N}_0\).

Proof. Suppose first that \(a=b\) as functions. Equal functions have the same value at every input in their domain. Therefore \(a(n)=b(n)\) for every \(n\in\mathbb{N}_0\).

Conversely, suppose \(a(n)=b(n)\) for every \(n\in\mathbb{N}_0\). The two functions have the same domain, namely \(\mathbb{N}_0\), and by assumption they agree at every input in that domain. By the definition of equality of functions, \(a=b\). This proves both directions. \(\square\)

This theorem gives a precise way to prove two sequences equal: start with an arbitrary index \(n\in\mathbb{N}_0\), calculate both terms, and show that the results agree. To show that they are unequal, it is enough to find one index at which their terms differ.

Worked Example: Proving Two Rules Give the Same Sequence

Define \(p,q:\mathbb{N}_0\to\mathbb{R}\) by \(p(n)=2(n+1)+1\) and \(q(n)=2n+3\). For an arbitrary \(n\in\mathbb{N}_0\), simplify:

$$ p(n)=2(n+1)+1=2n+2+1=2n+3=q(n). $$

Thus \(p(n)=q(n)\) for every index \(n\). By the theorem, \(p=q\) as sequences. The proof compares the functions on their entire domain, rather than checking only a few initial terms.

Boundedness as a Property of the Function’s Values

A sequence is called bounded when all of its terms stay within a fixed distance of zero. This definition is naturally stated using the function values. It is equivalent to saying that the sequence’s range is a bounded subset of \(\mathbb{R}\). The equivalence is useful because it lets us move between language about sequences and language about sets of real numbers.

Definition: A real sequence \(a:\mathbb{N}_0\to\mathbb{R}\) is bounded if there exists a real number \(M\geq0\) such that \(|a(n)|\leq M\) for every \(n\in\mathbb{N}_0\). Its range is bounded if there is such an \(M\) with \(|x|\leq M\) for every \(x\in a(\mathbb{N}_0)\).
Theorem: A real sequence is bounded if and only if its range is a bounded subset of \(\mathbb{R}\).

Proof. Let \(a:\mathbb{N}_0\to\mathbb{R}\). First suppose that \(a\) is bounded. Then there exists \(M\geq0\) such that \(|a(n)|\leq M\) for every \(n\in\mathbb{N}_0\). Take any \(x\in a(\mathbb{N}_0)\). By the definition of the range, there is an index \(n\in\mathbb{N}_0\) such that \(x=a(n)\). Hence \(|x|=|a(n)|\leq M\). This holds for every \(x\) in the range, so the range is bounded.

Conversely, suppose the range \(a(\mathbb{N}_0)\) is bounded. Then there exists \(M\geq0\) such that \(|x|\leq M\) for every \(x\in a(\mathbb{N}_0)\). For any \(n\in\mathbb{N}_0\), the value \(a(n)\) belongs to the range by its definition. Therefore \(|a(n)|\leq M\). This holds for every index, so \(a\) is bounded. The two implications prove the equivalence. \(\square\)

For example, the sequence \(a(n)=3n-2\) from the first worked example is not bounded: its terms grow as \(n\) increases. More explicitly, for any proposed \(M\geq0\), choose a nonnegative integer \(n\) large enough that \(3n-2>M\); then \(|a(n)|>M\). This is consistent with the theorem, since its range cannot be bounded either. By contrast, the sequence \(b(n)=(-1)^n\) is bounded by \(1\), since every term has absolute value \(1\).

Defining New Sequences Pointwise

The function viewpoint also explains how to combine sequences. If \(a\) and \(b\) are real sequences, their sum is formed by adding their values at the same index. A scalar multiple is formed by multiplying every value by the same real number. These operations produce functions with the same index domain.

Definition: For real sequences \(a,b:\mathbb{N}_0\to\mathbb{R}\) and a real number \(c\), define the sequences \(a+b\) and \(ca\) by \((a+b)(n)=a(n)+b(n)\) and \((ca)(n)=c\,a(n)\) for every \(n\in\mathbb{N}_0\).

These definitions are pointwise: at index \(n\), use the \(n\)-th term of each sequence. Since \(a(n)\) and \(b(n)\) are real numbers, their sum is real; likewise \(c\,a(n)\) is real. Thus both rules assign a real output to every index in \(\mathbb{N}_0\), so they really do define real sequences.

For instance, if \(a(n)=n+2\) and \(b(n)=2-n\), then

$$ (a+b)(n)=(n+2)+(2-n)=4 $$

at every index \(n\). The resulting sequence is the constant sequence with value \(4\). This calculation uses the function values at a common input; it does not combine terms with different indices.

A useful distinction runs through all of these definitions. The index identifies where a term sits in the sequence, while the value is the real number assigned there. A sequence is therefore not merely its range, and a formula for terms must be interpreted together with its domain. Once these points are explicit, statements about equality, boundedness, and operations on sequences become ordinary statements about functions.

A common pitfall is to infer a property of an entire sequence from a finite list of terms. Many different functions can agree at indices \(0,1,2,\) and \(3\), then differ later. Another is to use set language that erases indices: saying two sequences have the same values does not establish that their terms agree in the same order. When a claim concerns a sequence, identify whether it is about every indexed value, the range as a set, or only selected terms.

Check Your Understanding

Use the function viewpoint to answer each question. Pay attention to the domain and to the difference between terms and range.

  1. What are the domain and codomain of a real sequence under the convention used here?
  2. For \(r(n)=n^2-1\), calculate \(r_0,r_1,r_2\). What information about the sequence is not captured just by writing its range?
  3. What must be shown to prove that two real sequences are equal? What is enough to show that they are not equal?
  4. Explain why a sequence is bounded exactly when its range is a bounded subset of \(\mathbb{R}\).
  5. If \(a(n)=n\) and \(b(n)=5-n\), calculate \((a+b)(n)\) for an arbitrary index \(n\). What sequence does this define?