01 / 21

Sequences as
Functions & Recursion

Discover how every sequence is secretly a function on the integers, and master the art of recursive definitions that build each term from the ones before it.

Mathematics Algebra 2

What Is a Sequence?

A sequence is an ordered list of numbers that follows a definite pattern. Each number in the list is called a term, and every term has a specific position, called its index.

Sequences appear everywhere: population counts year by year, monthly savings deposits, the Fibonacci spiral in nature. Understanding their structure lets us predict future terms and analyze growth.

Sequences Are Functions

A sequence is a function whose domain is a subset of the integers (usually \( \{1, 2, 3, \ldots\} \) or \( \{0, 1, 2, \ldots\} \)) and whose range is the set of term values.

n (index) f(n) 0 2 4 6 8 1 2 2 4 3 6 4 8 5 10

Function Notation for Sequences

Because a sequence is a function, we can write it using function notation. There are two common styles:

Subscript Notation
\( a_n \) means "the term at position \( n \)." Example: \( a_3 = 8 \) means the 3rd term is 8.
Function Notation
\( f(n) \) means exactly the same thing. Example: \( f(3) = 8 \) means the 3rd term is 8.

Explicit vs Recursive Definitions

There are two ways to define a sequence function. Both produce the same terms, but they work very differently:

Explicit (Closed-Form)
Gives a formula to compute any term directly from its index \( n \). Example: \( a_n = 3n + 1 \). To find \( a_{100} \), just plug in \( n = 100 \).
Recursive
Defines each term using previous terms. Requires an initial condition. Example: \( a_1 = 4,\; a_n = a_{n-1} + 3 \). To find \( a_{100} \), you must compute all 99 terms before it.

Anatomy of a Recursive Definition

Every recursive definition has two essential parts. Miss either one and the sequence is undefined.

1
Base case (initial condition): The starting value(s). Example: \( f(1) = 5 \). Without this anchor, there's nothing to build from.
2
Recursive rule: A formula that expresses \( f(n) \) in terms of earlier terms like \( f(n-1) \) or \( f(n-2) \). Example: \( f(n) = f(n-1) + 3 \).

The Fibonacci Sequence

The most famous recursive sequence uses two base cases and looks back two terms:

f(0) 1 f(1) 1 f(2) 2 f(3) 3 f(4) 5 f(5) 8 f(6) 13 + + + + +

Each term is the sum of the two preceding terms. Because the rule references \( f(n) \) and \( f(n-1) \), we need two base cases to get started.

Explicit vs Recursive: Side by Side

Explicit Recursive
Formula type \( a_n = \text{expression in } n \) \( a_n = \text{expression in } a_{n-1} \)
To find \( a_{100} \) Plug in \( n = 100 \) directly Must compute all terms 1 through 99 first
Base case needed? No Yes, always
Example \( a_n = 2n + 1 \) \( a_1 = 3,\; a_n = a_{n-1} + 2 \)
Best for Direct calculation Describing a process step by step

How to Evaluate a Recursive Sequence

1
Identify the base case(s): Write down the starting value(s) given in the definition, e.g., \( a_1 = 3 \).
2
Write down the recursive rule: Note how the formula references previous terms, e.g., \( a_n = 2a_{n-1} - 1 \).
3
Build term by term: Starting from the base case, apply the rule to compute \( a_2 \), then \( a_3 \), and so on until you reach the desired term.
4
Verify your pattern: Check that each computed term satisfies the recursive rule when plugged back in.

Example 1: Arithmetic Sequence

1
Base case: \( a_1 = 5 \)
2
\( a_2 = a_1 + 4 = 5 + 4 = \) 9
3
\( a_3 = a_2 + 4 = 9 + 4 = \) 13
4
\( a_4 = a_3 + 4 = 13 + 4 = \) 17
5
\( a_5 = a_4 + 4 = 17 + 4 = \) 21

Example 2: Geometric Sequence

n g(n) 0 12 24 36 48 60 72 84 96 1 3 2 6 3 12 4 24 5 48 6 96

Notice the exponential growth: each term doubles. Explicit form: \( g(n) = 3 \cdot 2^{n-1} \). The graph curves upward steeply because multiplication compounds.

Example 3: Computing Fibonacci Terms

0
\( f(0) = \) 1 (base case)
1
\( f(1) = \) 1 (base case)
2
\( f(2) = f(1) + f(0) = 1 + 1 = \) 2
3
\( f(3) = f(2) + f(1) = 2 + 1 = \) 3
4
\( f(4) = 3 + 2 = \) 5, \( f(5) = 5 + 3 = \) 8, \( f(6) = 8 + 5 = \) 13
7
\( f(7) = f(6) + f(5) = 13 + 8 = \) 21

Why the Domain Matters

A sequence's domain is a subset of the integers. This is what makes it different from a continuous function like \( f(x) = 2x + 1 \).

Continuous Function x (all reals) Sequence (Discrete) n (integers only) 1 2 3 4 5

Writing a Recursive Definition

Given the sequence 4, 7, 10, 13, 16, ..., write both an explicit and recursive definition.

Explicit
Pattern: starts at 4, increases by 3. Formula: \( a_n = 3n + 1 \) where \( n \geq 1 \). Check: \( a_1 = 3(1) + 1 = 4 \) ✓
Recursive
Base case: \( a_1 = 4 \). Rule: \( a_n = a_{n-1} + 3 \) for \( n \geq 2 \). Check: \( a_2 = 4 + 3 = 7 \) ✓

Common Mistakes to Avoid

✕ Forgetting the Base Case
Writing \( a_n = a_{n-1} + 3 \) without specifying \( a_1 \). The sequence is undefined: there are infinitely many sequences satisfying that rule.
✕ Treating \( n \) as Continuous
Computing \( a_{2.5} \) or graphing a sequence with a connected line. The domain is integers only: use dots, not lines.
✕ Mixing Up Index and Value
Confusing \( n \) (the position) with \( a_n \) (the value). If \( a_3 = 10 \), the index is 3 and the value is 10: they are different numbers.

Summary: Types of Sequence Definitions

Arithmetic Geometric Fibonacci-type
Recursive rule \( a_n = a_{n-1} + d \) \( a_n = r \cdot a_{n-1} \) \( a_n = a_{n-1} + a_{n-2} \)
Base cases 1 needed 1 needed 2 needed
Explicit form \( a_n = a_1 + d(n-1) \) \( a_n = a_1 \cdot r^{n-1} \) No simple closed form
Growth pattern Linear Exponential Near-exponential

Question 1 of 5

A sequence is defined by \( a_1 = 2 \) and \( a_n = a_{n-1} + 5 \). What is \( a_4 \)?

Question 2 of 5

Which statement is true about the domain of a sequence?

Question 3 of 5

A recursive definition is missing its base case: \( a_n = 3 \cdot a_{n-1} \). Why is this definition incomplete?

Question 4 of 5

The Fibonacci sequence is defined by \( f(0) = 1,\; f(1) = 1,\; f(n+1) = f(n) + f(n-1) \) for \( n \geq 1 \). What is \( f(6) \)?

Question 5 of 5

Which of the following is a valid recursive definition for the sequence 6, 18, 54, 162, ...?