01 / 20

Sequences as
Functions & Recursion

Discover how sequences are functions with integer domains, and learn to define them using explicit and recursive formulas.

Algebra 1

What Is a Sequence?

A sequence is an ordered list of numbers that follows a pattern. Each number is called a term, and we label them with their position: \( a_1, a_2, a_3, \dots \)

2
\( a_1 \)
5
\( a_2 \)
8
\( a_3 \)
11
\( a_4 \)
... → → → → +3 +3 +3

Sequences Are Functions

A sequence is really a function whose domain is a subset of the integers (usually \( \{1, 2, 3, \dots\} \) or \( \{0, 1, 2, \dots\} \)). The input is the term number \( n \), and the output is the term value \( f(n) \).

Input (n) 1 2 3 4 5 Function
\( f(n) = 3n - 1 \)
Output f(n) 2 5 8 11 14

Why Does This Matter?

Treating sequences as functions lets you use all the tools of function analysis: notation, graphing, domain/range, and composition. It also unifies patterns you already know.

Function Notation
Write \( f(n) \) or \( a_n \) to name any term precisely.
Graphing
Plot points \( (n, a_n) \) on a coordinate plane: discrete dots, not a continuous curve.
Prediction
Use formulas to find the 100th or 1000th term without listing every value.

Explicit vs Recursive Formulas

There are two main ways to define a sequence as a function:

Explicit Formula
Gives the \( n \)th term directly from \( n \).

Example: \( a_n = 3n - 1 \)
Jump straight to any term.
Recursive Formula
Gives each term in terms of previous terms plus an initial value.

Example: \( a_1 = 2,\; a_n = a_{n-1} + 3 \)
Build term by term.

The Recursive Definition

A recursive definition has two parts:

1
Base case(s): One or more starting values, such as \( a_1 = 2 \).
2
Recurrence relation: A rule that expresses \( a_n \) using previous term(s), such as \( a_n = a_{n-1} + 3 \).

The Fibonacci Sequence

The Fibonacci sequence is the classic example of recursion that needs two base cases:

1
\( f_1 \)
1
\( f_2 \)
2
\( f_3 \)
3
\( f_4 \)
5
\( f_5 \)
8
\( f_6 \)
13
\( f_7 \)

Each term is the sum of the two before it. The two base cases \( f_1 = 1 \) and \( f_2 = 1 \) are both needed to start the chain.

Sequence Domain vs Continuous Domain

A key distinction: a sequence's domain is discrete integers, not all real numbers. This means the graph is isolated dots, not a connected line.

Sequence (discrete) n a(n) 1 2 3 4 5 3 5 7 9 11 Continuous function x f(x) 1 2 3 4 5

How to Write a Recursive Formula

1
Identify the pattern: Look at how consecutive terms relate. Is it adding, multiplying, or something else?
2
Write the base case(s): State the first term (or first two, if each term depends on two previous terms).
3
Write the recurrence: Express \( a_n \) in terms of \( a_{n-1} \) (and possibly \( a_{n-2} \)).
4
Verify: Use the formula to regenerate the first few terms and check they match the original sequence.

Example 1: Arithmetic Sequence

Define the sequence 4, 7, 10, 13, 16, ... both explicitly and recursively.

Explicit
Common difference \( d = 3 \).

\( a_n = 4 + 3(n - 1) = 3n + 1 \)
Recursive
Base case: \( a_1 = 4 \)

Recurrence: \( a_n = a_{n-1} + 3 \)

Example 2: Geometric Sequence

Define the sequence 3, 6, 12, 24, 48, ... both explicitly and recursively.

Explicit
Common ratio \( r = 2 \).

\( a_n = 3 \cdot 2^{n-1} \)
Recursive
Base case: \( a_1 = 3 \)

Recurrence: \( a_n = 2 \cdot a_{n-1} \)

Example 3: Two-Term Recursion

Define the sequence: 1, 3, 4, 7, 11, 18, ...

1
Base cases: \( a_1 = 1,\; a_2 = 3 \)
2
Recurrence: \( a_n = a_{n-1} + a_{n-2} \) for \( n \geq 3 \)
3
Verify: \( a_5 = a_4 + a_3 = 7 + 4 = 11 \) ✓

Graphing a Sequence as a Function

Plot \( a_n = 3n + 1 \) on a coordinate plane. Each point is \( (n, a_n) \).

n (term number) a(n) 0 2 4 6 8 10 12 14 1 2 3 4 5 (1, 4) (2, 7) (3, 10) (4, 13) (5, 16)

When to Use Explicit vs Recursive

Explicit Recursive
Find the 100th term Fast: plug in \( n = 100 \) Slow: compute all 99 terms first
Ease of discovery Requires spotting a closed-form pattern Easy: just describe term-to-term change
Complex patterns May not exist (e.g., Fibonacci) Natural fit for multi-term rules
Computer programs Great for direct lookup Great for loops and iteration

Common Mistakes

✕ Forgetting the Base Case
Writing \( a_n = a_{n-1} + 3 \) alone is incomplete. You need \( a_1 = \text{some value} \).
✕ Using Real-Number Domain
Plugging \( n = 2.5 \) into a sequence formula: the domain is integers only.
✕ Mixing Up \( n \) and \( a_n \)
Confusing the position (which term) with the value (what the term equals).

Question 1 of 5

What is the domain of a sequence when viewed as a function?

Question 2 of 5

Given \( a_1 = 5 \) and \( a_n = a_{n-1} + 4 \), what is \( a_4 \)?

Question 3 of 5

Which recursive definition correctly describes the sequence 2, 6, 18, 54, ...?

Question 4 of 5

The Fibonacci sequence is defined by \( f_1 = 1, \; f_2 = 1, \; f_n = f_{n-1} + f_{n-2} \) for \( n \geq 3 \). What is \( f_6 \)?

Question 5 of 5

If \( a_n = 4n - 3 \), what is the value of \( a_{20} \)?