Unit 9, lesson 101

Introduction to Sequences and Factorials

What a sequence is as a function of an integer index, how to read its terms from an explicit formula and where the counting starts, and how factorials work and simplify.

  • Theory part 201
  • Practice part 202
  • Sequences

A thermometer read once every hour, the balance of a savings account at the end of each year, the number of tiles in each row of a staircase pattern. Each gives a first number, a second, a third and so on, with nothing in between. Such an ordered list is a sequence, and it is really a function whose inputs are positions.

Key terms

Sequence as a function of an integer index

Definition A sequence is a function whose domain is a set of consecutive integers, either {n0,n0+1,…,N}\{n_0, n_0 + 1, \dots, N\} for integers n0≤Nn_0 \le N or {n0,n0+1,n0+2,… }\{n_0, n_0 + 1, n_0 + 2, \dots\} for an integer n0n_0. In this course its values are real numbers. The value at the integer nn is written ana_n instead of a(n)a(n) and is called the term with index nn. The whole sequence is written {an}\{a_n\}, or {an}n=1∞\{a_n\}_{n=1}^{\infty} when the indices should be shown.

In plain words A sequence is a list of numbers in a definite order, with a position number attached to each entry. The position is the input and the entry is the output.

Example The sequence an=na_n = \sqrt{n} for n≥1n \ge 1 starts like this.

nn1122334455
ana_n112≈1.414\sqrt{2} \approx 1.4143≈1.732\sqrt{3} \approx 1.732225≈2.236\sqrt{5} \approx 2.236

Its graph is the separate dots (1,1)(1, 1), (2,2)(2, \sqrt{2}), (3,3)(3, \sqrt{3}) and so on. They sit on the curve y=xy = \sqrt{x}, yet the sequence has no value at n=2.5n = 2.5, because 2.52.5 is not an index. The curve is one unbroken piece, while the sequence is a row of isolated points.

Indexing convention

Definition The indexing convention of a sequence is the choice of its first index n0n_0. Most texts start at n0=1n_0 = 1, so that a1a_1 is the first term and ana_n is the nnth term. Starting at n0=0n_0 = 0 is common when a0a_0 stands for a starting amount. With first index n0n_0 the kkth term is an0+k−1a_{n_0 + k - 1}, so the same list of numbers needs a different formula when the first index changes.

In plain words Before you use a formula, check where the counting starts. Starting at 00 instead of 11 shifts every position by one.

Example The odd numbers 1,3,5,7,…1, 3, 5, 7, \dots can be written as an=2n−1a_n = 2n - 1 for n≥1n \ge 1 or as bn=2n+1b_n = 2n + 1 for n≥0n \ge 0. The tenth odd number is a10=19a_{10} = 19 in the first description and b9=19b_9 = 19 in the second. Writing b10b_{10} would give 2121, which is the eleventh odd number.

Explicit term

Definition An explicit formula for a sequence gives the term ana_n directly as an expression in the index nn, valid for every index in the domain. This expression is called the general term or the nnth term. To find a particular term, substitute its index. Finitely many terms never determine an infinite sequence on their own, so an infinite sequence is known only once its rule is given.

In plain words An explicit formula lets you jump straight to any position, the hundredth term as easily as the second. A pattern you spot in the first few terms is a guess until a rule backs it up.

Example An account starts with 1000 dollars and earns 5 percent interest once a year. Its balance after nn years is an=1000(1.05)na_n = 1000(1.05)^n for n≥0n \ge 0, where a0=1000a_0 = 1000 is the starting balance. After three years

a3=1000⋅1.053=1157.625,a_3 = 1000 \cdot 1.05^3 = 1157.625,

about 1157.63 dollars. Guessing from a few terms is risky. With n≥1n \ge 1 the numbers 2,4,82, 4, 8 are the first terms of an=2na_n = 2^n, which continues with 1616. They are also the first terms of bn=n2−n+2b_n = n^2 - n + 2, which continues with 1414.

Finite and infinite sequences

Definition A sequence is finite when its domain is a finite set {n0,n0+1,…,N}\{n_0, n_0 + 1, \dots, N\}. It then has N−n0+1N - n_0 + 1 terms and a last term aNa_N. A sequence is infinite when its domain is {n0,n0+1,n0+2,… }\{n_0, n_0 + 1, n_0 + 2, \dots\}, so it has a term for every integer from n0n_0 on and no last term. Calculus works only with infinite sequences, and there the word sequence on its own always means an infinite one.

In plain words A finite sequence stops. An infinite sequence goes on forever, which is what the three dots at the end of a list mean.

Example The numbers of days in the months of a year that is not a leap year form the finite sequence

31,28,31,30,31,30,31,31,30,31,30,31.\begin{gathered} 31, 28, 31, 30, 31, 30, \\[0.4em] 31, 31, 30, 31, 30, 31. \end{gathered}

It has 1212 terms and no simple formula, and that is fine. The perfect squares 1,4,9,16,…1, 4, 9, 16, \dots form the infinite sequence an=n2a_n = n^2 for n≥1n \ge 1. A finite sequence with indices from 33 to 1010 has 10−3+1=810 - 3 + 1 = 8 terms, not 77.

Factorial

Definition For a positive integer nn, the factorial of nn is the product of the integers from 11 to nn,

n!=n(n−1)(n−2)⋯2⋅1.n! = n(n - 1)(n - 2) \cdots 2 \cdot 1.

By definition 0!=10! = 1. Factorials are defined here only for nonnegative integers, and for every n≥1n \ge 1 they satisfy

n!=n⋅(n−1)!.n! = n \cdot (n - 1)!.

The number n!n! counts the ways to arrange nn different objects in a row.

In plain words Multiply all the whole numbers from nn down to 11. The value 0!=10! = 1 is chosen so that the step n!=n⋅(n−1)!n! = n \cdot (n - 1)! also works for n=1n = 1.

Example The first factorials grow quickly.

nn0011223344556677
n!n!11112266242412012072072050405040

Five different books can stand on a shelf in 5!=1205! = 120 orders. There are 55 choices for the first spot, then 44 for the second, and so on down to 11 for the last. Already 10!=3 628 80010! = 3\,628\,800.

Simplifying factorial expressions

Definition For integers n>k≥0n > k \ge 0, the factors of n!n! from nn down to k+1k + 1 can be split off, so

n!=n(n−1)⋯(k+1)⋅k!n! = n(n - 1) \cdots (k + 1) \cdot k!

and

n!k!=n(n−1)⋯(k+1).\frac{n!}{k!} = n(n - 1) \cdots (k + 1).

The quotient is the product of the n−kn - k consecutive integers from k+1k + 1 to nn. When n=kn = k the quotient is simply 11. Factorials do not distribute over sums or products. For example (2⋅3)!=720(2 \cdot 3)! = 720 while 2!⋅3!=122! \cdot 3! = 12, and (3+2)!=120(3 + 2)! = 120 while 3!+2!=83! + 2! = 8.

In plain words Write the larger factorial out until the smaller one appears, then cancel it. Most of the product disappears.

Example Cancelling 8!8! gives

10!8!=10⋅9⋅8!8!=90.\frac{10!}{8!} = \frac{10 \cdot 9 \cdot 8!}{8!} = 90.

The same idea works with letters. For n≥0n \ge 0 and for n≥1n \ge 1 respectively,

(n+2)!n!=(n+2)(n+1),(2n)!(2n−1)!=2n.\begin{gathered} \frac{(n + 2)!}{n!} = (n + 2)(n + 1), \\[0.8em] \frac{(2n)!}{(2n - 1)!} = 2n. \end{gathered}

Arithmetic on terms

Definition Let {an}\{a_n\} and {bn}\{b_n\} be sequences with the same indices and let cc be a real number. Their sum, difference, constant multiple and product are formed term by term,

{an+bn},{an−bn},{c an},{anbn},\begin{gathered} \{a_n + b_n\}, \qquad \{a_n - b_n\}, \\[0.4em] \{c\,a_n\}, \qquad \{a_n b_n\}, \end{gathered}

and the quotient {an/bn}\{a_n / b_n\} is defined when bn≠0b_n \ne 0 for every nn. To get a term at a shifted index such as an+1a_{n+1} or a2na_{2n}, replace every nn in the explicit formula by n+1n + 1 or by 2n2n. The difference an+1−ana_{n+1} - a_n and, for nonzero terms, the ratio an+1/ana_{n+1} / a_n compare each term with the next one.

In plain words Sequences combine position by position, first with first and second with second. A shifted index means substituting into the formula, and the term an+1a_{n+1} is usually not an+1a_n + 1.

Example For an=n2a_n = n^2 with n≥1n \ge 1,

an+1=(n+1)2=n2+2n+1,an+1−an=2n+1,\begin{gathered} a_{n+1} = (n + 1)^2 = n^2 + 2n + 1, \\[0.4em] a_{n+1} - a_n = 2n + 1, \end{gathered}

so consecutive squares differ by the odd numbers 3,5,7,…3, 5, 7, \dots, while an+1=n2+1a_n + 1 = n^2 + 1 is something else. For bn=3n/n!b_n = 3^n / n! with n≥0n \ge 0 the ratio of consecutive terms is

bn+1bn=3n+1(n+1)!⋅n!3n=3n+1.\frac{b_{n+1}}{b_n} = \frac{3^{n+1}}{(n + 1)!} \cdot \frac{n!}{3^n} = \frac{3}{n + 1}.

This ratio is less than 11 for n≥3n \ge 3, so every term after b3b_3 is smaller than the one before it. The terms 1,3,4.5,4.5,3.375,2.0251, 3, 4.5, 4.5, 3.375, 2.025 show the turn.

Check yourself

  1. Write the first four terms of the sequence below, with nn starting at 00.
an=(−1)nn!a_n = \frac{(-1)^n}{n!}
Show the answer

The terms are a0=1a_0 = 1, a1=−1a_1 = -1, a2=12a_2 = \frac{1}{2} and a3=−16a_3 = -\frac{1}{6}. Remember that 0!=10! = 1 and that (−1)n(-1)^n flips the sign at each step.

  1. Simplify the expressions below, the second one for n≥1n \ge 1.
12!10!⋅2!,(n+1)!(n−1)!\frac{12!}{10! \cdot 2!}, \qquad \frac{(n + 1)!}{(n - 1)!}
Show the answer

Cancel the smaller factorial in each,

12⋅11⋅10!10!⋅2=1322=66,(n+1)⋅n⋅(n−1)!(n−1)!=n(n+1).\begin{gathered} \frac{12 \cdot 11 \cdot 10!}{10! \cdot 2} = \frac{132}{2} = 66, \\[0.8em] \frac{(n + 1) \cdot n \cdot (n - 1)!}{(n - 1)!} = n(n + 1). \end{gathered}
  1. For an=1na_n = \frac{1}{n} with n≥1n \ge 1, find and simplify an+1−ana_{n+1} - a_n. What does its sign tell you?
Show the answer

The difference is

1n+1−1n=n−(n+1)n(n+1)=−1n(n+1),\begin{aligned} \frac{1}{n + 1} - \frac{1}{n} &= \frac{n - (n + 1)}{n(n + 1)} \\[0.8em] &= -\frac{1}{n(n + 1)}, \end{aligned}

which is negative for every n≥1n \ge 1. So each term is smaller than the one before it.

How this lesson connects

Where this leads in Calculus