What a sequence really is
A sequence is not merely a row of numbers written with commas. Formally, it is a function whose input is a positive integer and whose output is a real number. The input tells us the position of the term. The output is the value sitting at that position.
Definition
Sequence of real numbers
A sequence of real numbers is a function
Instead of writing a(n), we usually write , and we denote the whole
sequence by .
This definition is worth taking seriously. It explains why the same values in
a different order form a different sequence, and why a formula for must
say what happens for every positive integer n.
Worked example
Reading a general term
If , then
If , then
Both are sequences because each positive integer n determines exactly one
real number.
Finding general terms from patterns
A finite list suggests a pattern, but the general term must describe the
n-th term, not just the first few terms.
Worked example
Alternating zeros and ones
The sequence
is 1 when n is odd and 0 when n is even. A compact formula is
When n is odd, is even and the numerator is 2. When n is even,
is odd and the numerator is 0.
Worked example
Products of even and odd factors
The product
has the k-th factor 2k. Therefore
Similarly,
because (2n)! is the product of all factors from 1 to 2n, and dividing
by the even part leaves only the odd part.
Worked example
A sequence made from repeated differentiation
The chapter also uses to show that sequences do not have to come
from ordinary lists first. Define , where means the
n-th derivative. The derivatives cycle:
So
and the same four-term pattern repeats. One compact general term is
This example is important because it separates the idea of a sequence from the
idea of a simple algebraic pattern. The sequence is still a function of the
index n; its values are produced by a calculus operation before evaluating at
0.
Common mistake
A pattern is not a definition until the indexing is fixed
Writing 2,4,8,... is not as precise as writing . The first term
matters: would give 2,4,8,... only if the indexing started at
with first term 2, while the chapter example 1,2,4,8,... is
.
Recursive definitions
Some sequences are easier to define by saying how to get the next term from earlier terms.
Definition
Recursive sequence
A recursive sequence is a sequence whose terms are defined using one or more preceding terms, together with enough initial values to start the process.
For example,
gives
The recurrence determines the next term only after the earlier term is known.
For this particular recurrence, we can also find a closed formula. Add 1 to
both sides and set . Then
Since , the transformed sequence is geometric:
Therefore
The lesson is not that every recurrence becomes geometric. The useful habit is to look for a change of variables that removes the constant term when the recurrence is affine.
Theorem
Recursion theorem
Let be a set, let , and let be a function. Then there is a unique function such that
for every .
The theorem gives the formal reason why a first term plus a rule such as
really defines a sequence. The rule never leaves , because
f maps back into , and uniqueness says that there is no second
sequence satisfying the same starting value and same next-term rule.
Worked example
Turning a recurrence into theorem data
For
take , , and . The recursion theorem says that there is a unique real sequence satisfying this rule. The first terms are
There may be no simple closed formula, but the sequence is still completely defined.
Fibonacci as a first-order recursion on pairs
The Fibonacci sequence is defined by two starting values and a rule using the previous two terms:
To fit the recursion theorem, package two consecutive values as one ordered pair:
Then the next pair is obtained from the function
So a two-term recurrence can be viewed as a one-step recurrence on the set .
Theorem
Binet form of Fibonacci numbers
Let
Then for every positive integer n,
This formula is usually proved by checking that the right-hand side has the same first two values and satisfies the same recurrence. The essential identities are and .
Here is the verification in a form that is useful for similar recurrence questions. Define
First,
Next, because each of and satisfies , we have
Subtracting the second identity from the first and dividing by gives
Thus has the same first two values and the same recursive rule as the
Fibonacci sequence. By uniqueness of the recursively defined sequence,
must equal for every positive integer n.
Arithmetic sequences and sums
Definition
Arithmetic sequence
A sequence is arithmetic if there is a constant d such that
for every . The number d is the common difference.
If , then the general term is
The sum of the first n terms is
The last equality comes from pairing the first term with the last, the second with the second-last, and so on. Every pair has the same sum .
Worked example
Recover an arithmetic sequence from a sum
Suppose the common difference is d=3/2 and the sum of the first 15 terms is
240. Then
Solving gives .
If the sum of the first k terms is 361, then
This simplifies to
The positive integer solution is ; the other root is rejected because a number of terms cannot be negative.
Geometric sequences and sums
Definition
Geometric sequence
A sequence of nonzero numbers is geometric if there is a nonzero
constant r such that
for every . The number r is the common ratio.
If , then
For , the finite geometric sum is
The proof is the subtraction trick:
If , the sum is simply bn.
Read and try
Compare recursive and explicit sequence descriptions
The lab lets readers switch among arithmetic, geometric, and affine recursive sequences to compare terms, closed forms, and finite sums.
Key relation
,
Result
Successive differences stay constant. The sum pairs the first and last terms.
Show between 1 and 12 displayed terms or months.
| n | a_n | Partial sum |
|---|---|---|
| 1 | 5.5 | 5.5 |
| 2 | 7.0 | 12.5 |
| 3 | 8.5 | 21.0 |
| 4 | 10.0 | 31.0 |
| 5 | 11.5 | 42.5 |
| 6 | 13.0 | 55.5 |
Arithmetic-geometric sums
The final exercise in the source chapter mixes an arithmetic factor with a geometric factor. Let
where and , and define
This is not a new kind of magic formula. It is the same subtraction method,
but now the coefficient changes by d when the index moves forward. Compare
with :
The middle part is again a geometric sum. Dividing by and simplifying gives the source formula
Common mistake
Watch the shifted boundary term
The boundary term is the subtle point. The last term in is , but after combining with the finite geometric sum the equivalent final formula can be written with .
An applied recurrence: the mortgage formula
The chapter's mortgage example is a useful applied recurrence. Let:
- be the initial principal;
- be the annual fixed interest rate;
- be the duration in months;
xbe the monthly payment;- be the loan amount after the
n-th monthly payment.
Then
Writing q=1+R/12, repeated substitution gives
Using the geometric sum,
To finish the loan after months, set , so
The formula is not a separate trick. It is the geometric series formula applied to a recurrence where interest multiplies the balance and the payment subtracts from it.
Quick checks
Quick check
A sequence is formally a function from which set to which set in this chapter?
Use the chapter definition.
Solution
Answer
Quick check
For and , what is ?
Compute one term at a time.
Solution
Answer
Quick check
What is the sum of the first n terms of an arithmetic sequence with first term a and common difference d?
Use first-last pairing.
Solution
Answer
Quick check
Why does the geometric-sum formula need a separate case when ?
Look at the denominator.
Solution
Answer
Quick check
In the arithmetic-geometric sum, why is the method useful?
Track what happens to the coefficient after shifting by one power of
r.
Solution
Answer
Exercises
- Find a formula for .
- Prove that
1\cdot3\cdot5\cdots(2n-1)=(2n)!/(2^n n!). - Let and . Find and .
- Let and . Find and the sum of the first
nterms. - Let
B_n=(\phi^n-\psi^n)/(\phi-\psi), where\phi=(1+\sqrt5)/2and\psi=(1-\sqrt5)/2. Verify that and . - Let and . Write using a finite geometric sum.
- Let
x_k=(2+3k)5(1/2)^kand . Write using the arithmetic-geometric formula.
Guided solutions
-
The term is
1on odd indices and0on even indices, soa_n=(1+(-1)^{n-1})/2. -
Divide
(2n)!into its even and odd factors. The even product is , so the odd product is(2n)!/(2^n n!). -
This is arithmetic with first term
3and common difference4, hence ands_n=n[2\cdot3+(n-1)4]/2=n(2n+1). -
This is geometric with first term
5and ratio3, so ands_n=5(3^n-1)/(3-1)=5(3^n-1)/2. -
Since and , multiplying by or gives and . Subtract the two identities and divide by to obtain . Also and
B_2=(\phi^2-\psi^2)/(\phi-\psi)=\phi+\psi=1. Therefore satisfies the same initial values and recurrence as Fibonacci. -
Repeated substitution gives
L_n=2000(1.02)^n-150[(1.02)^{n-1}+\cdots+1], soL_n=2000(1.02)^n-150((1.02)^n-1)/0.02. -
Here , , , and
r=1/2. ThereforeThis can be simplified further, but the important point is the substitution into the general finite-sum formula.