Sequences and Notation

Learning goals

  • Define a sequence as a function on consecutive integers, finite or infinite
  • Separate the index from the term it names
  • Contrast an explicit rule with a recursive one
  • Supply enough seeds for a recursion that looks back kk steps
  • Read ∑k=mpak\sum_{k=m}^{p} a_k with both limits included
  • Treat the summation index as a dummy name

A sequence is a function on consecutive integers

Definition. A sequence is a function whose domain is a run of consecutive integers, starting from some stated place and continuing upward, either forever, which makes an infinite sequence, or until it has exactly kk terms, which makes a finite sequence. Unless a lesson says otherwise, that starting place is 11, so the default domain is {1,2,3,…}\{1, 2, 3, \ldots\} (infinite) or {1,2,…,k}\{1, 2, \ldots, k\} (finite, with kk terms). Some sequences are more natural indexed from 00 instead, with domain {0,1,2,…}\{0, 1, 2, \ldots\} or {0,1,…,k−1}\{0, 1, \ldots, k-1\} for the same kk terms; the idea is unchanged, because the inputs are still consecutive integers running upward from wherever the lesson says to start. If the function is named aa, we write its output at the input nn as ana_n rather than a(n)a(n), and we call ana_n the term of the sequence at index nn.

The only genuinely new thing in that definition is the subscript. Where you used to write f(3)f(3) you now write a3a_3, and where you used to write f(n)=n2+1f(n) = n^2 + 1 you now write an=n2+1a_n = n^2 + 1. The parentheses became a subscript and nothing else moved:

an  =  a(n).a_n \;=\; a(n).

The input nn is called the index. Because the domain is always a run of consecutive integers, the inputs arrive in a natural order, one after the next with nothing skipped, whether that run is finite, infinite, or starts at 00. That built-in order is exactly why a sequence is so naturally written as a list, in a way that most functions, whose inputs come in no particular order, are not. The list is not a second object sitting beside the function; it is the function’s output table, read from left to right.

A sequence as a function from indices to termsIndices 1 through 5 on the left, arrows carrying each one through the rule n squared plus 1, and the resulting terms 2, 5, 10, 17, 26 on the right.index nan = n2 + 1term an1234525101726
A sequence is a function. Feed it an index (1, 2, 3, and so on) and it hands back a term. The only new thing is the subscript, which is what you would otherwise write as a(n).

Two habits are worth fixing right away. First, the index and the term play different roles and need not match: above, a3=10a_3 = 10, so the index is 33 while the term is 1010. Second, order is part of the data. The set {2,5,10}\{2, 5, 10\} does not care which element you name first, but the sequence 2,5,102, 5, 10 does, because every term is pinned to a particular index.

Since a sequence is a function, it has a graph: plot the point (n,an)(n, a_n) for each index nn. But only the consecutive integers in the domain are legal inputs, so the graph is a scatter of separate dots and never a curve. There is no point above n=2.5n = 2.5, because 2.52.5 is outside the domain, which means a2.5a_{2.5} names nothing at all.

The graph of a sequence is a set of isolated pointsFive dots at (1,2), (2,5), (3,10), (4,17), (5,26), with a dashed line at n = 2.5 showing that no term exists between the indices.nan102012345no term here25101726
The graph of a sequence is a scatter of separate dots, one for each index. Nothing sits above 2.5, because 2.5 is not an index in this sequence's domain, so joining the dots into a curve would invent points the sequence does not have.

Terms, indices, and what a list does not tell you

You can usually tell which kind of sequence is meant from how the list is written. When someone writes 3,7,11,153, 7, 11, 15 they mean a finite sequence with four terms, full stop. The trailing dots in 3,7,11,15,…3, 7, 11, 15, \ldots signal an infinite one instead: the list keeps going by the same rule.

As the definition promised, indexing does not have to begin at 11. Some sequences are more natural starting from 00 (a bank balance before any interest has been added, say), and then the domain is {0,1,2,…}\{0, 1, 2, \ldots\} and the first term is a0a_0. The idea survives intact, because the inputs are still consecutive integers running upward from a stated place. What you may never do is leave that place unstated. That is because a3a_3 is the fourth term when the count begins at 00, and the third term when it begins at 11. Every sequence in this lesson starts at n=1n = 1 unless it says otherwise.

Check your understanding

A sequence lists exactly five terms, b0,b1,b2,b3,b4b_0, b_1, b_2, b_3, b_4, and no more. What is its domain?

Answer choices

Now a warning that will save you a lot of grief: a few terms never determine how a sequence continues. This is about predicting more terms, not about a complete finite list: written all the way out, 3,7,11,153, 7, 11, 15 is the whole sequence, full stop, exactly as the paragraph above says. But shown the opening 2,4,6,8,…2, 4, 6, 8, \ldots with no promise that it stops there, you would probably guess “the even numbers”, an=2na_n = 2n, so the next term is 1010. That is a reasonable guess, but it is still only a guess: the same four terms 2,4,6,82, 4, 6, 8 are also the start of the sequence that simply repeats, 2,4,6,8,2,4,6,8,…2, 4, 6, 8, 2, 4, 6, 8, \ldots, and of many other sequences besides. A pattern you spot in a handful of terms is a guess, sometimes an excellent guess, but how the sequence continues is whatever the rule says it is. That is why the rest of this lesson is about stating a rule precisely. That is also why a puzzle that shows four terms and asks “what comes next” has, strictly speaking, many right answers.

Check your understanding

For the sequence an=n2−3na_n = n^2 - 3n, what is a5a_5?

Answer choices

Explicit rules and recursive rules

There are two standard ways to pin a sequence down: state ana_n directly, or build it from earlier terms. Each has a different cost, as the rest of this section shows.

An explicit rule (also called a closed form) gives ana_n directly as an expression in nn:

an=n2+1.a_n = n^2 + 1.

Want the 500500th term? Substitute, and you are done: a500=5002+1=250,001a_{500} = 500^2 + 1 = 250{,}001. You never had to look at any other term.

A recursive rule instead gives one or more starting values, called seeds, and then a rule that builds each new term out of earlier ones:

a1=2,an=an−1+2n−1for n≥2.a_1 = 2, \qquad a_n = a_{n-1} + 2n - 1 \quad \text{for } n \ge 2.

Run it: a2=2+3=5a_2 = 2 + 3 = 5, then a3=5+5=10a_3 = 5 + 5 = 10, then a4=10+7=17a_4 = 10 + 7 = 17. Those are the same terms the explicit rule produced, which is not a coincidence, and here is why, in a moment.

The seed is not decoration. Delete it and the rule no longer pins down one particular sequence. The bare rule an=an−1+2n−1a_n = a_{n-1} + 2n - 1 for n≥2n \ge 2 is obeyed by 2,5,10,17,…2, 5, 10, 17, \ldots, and equally by 0,3,8,15,…0, 3, 8, 15, \ldots, and by infinitely many other sequences, one for every choice of a1a_1. The rule tells you how to take a step; the seed tells you where you are standing when you take the first one. Leaving it out is the most common error in this chapter.

Some recursions look back further than one step and therefore need more than one seed. To compute a3a_3 from the rule an=an−1+an−2a_n = a_{n-1} + a_{n-2} for n≥3n \ge 3 you need both a2a_2 and a1a_1, so both have to be handed to you. The famous choice a1=1a_1 = 1 and a2=1a_2 = 1 produces 1,1,2,3,5,8,13,…1, 1, 2, 3, 5, 8, 13, \ldots, the Fibonacci sequence. In general, a recursion that reaches back kk steps needs kk seeds, since the rule alone can never produce the first kk terms.

Worked example 1 List the first four terms of an=(−1)n(n+1)2na_n = \dfrac{(-1)^n (n+1)}{2n}

Substitute n=1,2,3,4n = 1, 2, 3, 4 in turn, and let the factor (−1)n(-1)^n do the sign work: it is −1-1 at odd indices and +1+1 at even ones.

At n=1n = 1 and n=2n = 2,

a1=(−1)1(2)2=−1,a2=(−1)2(3)4=34.a_1 = \frac{(-1)^1 (2)}{2} = -1, \qquad a_2 = \frac{(-1)^2 (3)}{4} = \frac{3}{4}.

At n=3n = 3 and n=4n = 4, reduce each fraction as you go:

a3=(−1)3(4)6=−46=−23,a4=(−1)4(5)8=58.a_3 = \frac{(-1)^3 (4)}{6} = -\frac{4}{6} = -\frac{2}{3}, \qquad a_4 = \frac{(-1)^4 (5)}{8} = \frac{5}{8}.

So the sequence opens −1, 34, −23, 58,…-1, \ \frac{3}{4}, \ -\frac{2}{3}, \ \frac{5}{8}, \ldots A factor of (−1)n(-1)^n is the standard way to make a sequence alternate in sign, and it is worth recognizing on sight.

Worked example 2 Find a5a_5 for the recursion a1=2a_1 = 2, a2=5a_2 = 5, an=an−1+2an−2a_n = a_{n-1} + 2a_{n-2} for n≥3n \ge 3

This rule reaches back two steps, so it comes with two seeds, and you cannot jump straight to a5a_5. Build the terms in order.

The rule at n=3n = 3 uses the two seeds:

a3=a2+2a1=5+2(2)=9.a_3 = a_2 + 2a_1 = 5 + 2(2) = 9.

Now a3a_3 and a2a_2 give a4a_4, and then a4a_4 and a3a_3 give a5a_5:

a4=a3+2a2=9+2(5)=19,a5=a4+2a3=19+2(9)=37.a_4 = a_3 + 2a_2 = 9 + 2(5) = 19, \qquad a_5 = a_4 + 2a_3 = 19 + 2(9) = 37.

The sequence is 2,5,9,19,37,…2, 5, 9, 19, 37, \ldots Notice what the answer cost: two intermediate terms, a3a_3 and a4a_4, computed only to get to the one value asked for. Reaching a100a_{100} this way would mean computing a3a_3 through a100a_{100} first, 9898 more terms, which is exactly the weakness an explicit rule fixes.

Here is why that is no coincidence, in plain terms. Go back to the explicit rule an=n2+1a_n = n^2 + 1 and its recursion a1=2a_1 = 2, an=an−1+2n−1a_n = a_{n-1} + 2n - 1: both start from the same value, 22. And at every step after that, both do the exact same thing to get the next term. The explicit rule’s value goes up by 2n−12n - 1 each time nn increases by 11, since (n2+1)−((n−1)2+1)=2n−1(n^2+1) - \big((n-1)^2+1\big) = 2n - 1, and that is exactly the step the recursive rule takes. Two rules that start in the same place and always take the same step land on the same value at every step after that, all the way out. That is also why the labor differs even though the answer does not: the explicit rule hands you a100=1002+1=10,001a_{100} = 100^2 + 1 = 10{,}001 in a single substitution, while the recursion reaches the same number only after 9999 additions.

That is the trade in general. A recursive rule is usually the easier one to write down, because it often states plainly what is happening. Such a rule often says: add the next odd number, double the previous term, add the last two. An explicit rule is the one you want when you need a distant term, because it does not care how far out you go. Neither kind is more correct than the other. They are two descriptions of one function, and a good deal of the skill in this chapter is moving between them.

Check your understanding

A sequence is given by a1=5a_1 = 5 and an=2an−1−3a_n = 2a_{n-1} - 3 for n≥2n \ge 2. What is a3a_3?

Answer choices

Sigma notation

Sequences get added. To say “add the first fifty terms of aa” you could write a1+a2+⋯+a50a_1 + a_2 + \cdots + a_{50}. But those dots are an instruction to the reader rather than a definition, and they get worse as soon as the pattern of the terms is not obvious. Mathematics has a compact and unambiguous symbol for the job.

Definition. For indices m≤pm \le p in the sequence’s domain,

∑k=mpak  =  am+am+1+am+2+⋯+ap.\sum_{k=m}^{p} a_k \;=\; a_m + a_{m+1} + a_{m+2} + \cdots + a_p .

The symbol ∑\sum is a capital Greek sigma, the Greek SS, standing for sum. Read the notation as an instruction: let kk start at the lower limit mm and walk up through the integers one at a time. Keep going until kk reaches the upper limit pp. Evaluate the expression to the right of the sigma at each value of kk, and add every result. The letter kk is the index of summation, and the expression being evaluated is the summand. Both limits are included, at the bottom and at the top.

The parts of a sigma sumThe expression sum from k equals 1 to 5 of k squared, with its upper limit, lower limit, index, and summand labeled, and its expansion to 55.upper limit5Σk = 1the index and where it startsany letter will dothe term being addedk2= 1 + 4 + 9 + 16 + 25 = 55
The anatomy of a sigma sum. The index runs through every integer from the lower limit up to the upper limit, the summand is evaluated at each one, and the results are added. The capital Greek sigma stands for sum.

Three features of that notation deserve to be said out loud.

The letter under the sigma is only a temporary name, a local label for the index. It appears only under the sigma and inside the summand, it vanishes the moment the sum is worked out, and the answer contains no trace of it. The formal name for a letter used this way is a dummy index:

∑k=14k2  =  ∑i=14i2  =  ∑j=14j2  =  1+4+9+16  =  30.\sum_{k=1}^{4} k^2 \;=\; \sum_{i=1}^{4} i^2 \;=\; \sum_{j=1}^{4} j^2 \;=\; 1 + 4 + 9 + 16 \;=\; 30 .

Rename the index to any fresh letter and the value cannot change, because the terms being added are untouched. The one restriction is that the new name must not already be doing another job in the expression. For instance, renaming kk to nn inside ∑k=1nk\sum_{k=1}^{n} k would be a disaster, since nn is the upper limit there.

Check your understanding

The sums ∑k=16k3\displaystyle\sum_{k=1}^{6} k^3 and ∑i=16i3\displaystyle\sum_{i=1}^{6} i^3 are written with different index letters. What is true?

Answer choices

Counting the terms is an off-by-one trap. Running the index from mm up to pp produces the indices m,m+1,…,pm, m+1, \ldots, p, and when m≤pm \le p there are

p−m+1p - m + 1

of them. Subtracting the limits counts the steps between them, and a list always has one more entry than it has steps. So from k=3k = 3 to k=8k = 8 there are five steps but six terms, namely 3,4,5,6,7,83, 4, 5, 6, 7, 8.

The summand need not mention the index. In

∑k=157  =  7+7+7+7+7  =  35,\sum_{k=1}^{5} 7 \;=\; 7 + 7 + 7 + 7 + 7 \;=\; 35 ,

the index still runs 1,2,3,4,51, 2, 3, 4, 5 and the summand is still evaluated five times. It simply returns 77 every time. The limits, not the summand, control how many terms there are, even when the summand never mentions the index at all.

A sum of terms of a sequence is called a series. Adding finitely many terms always produces an ordinary number, which is all this lesson needs. What an infinite sum could possibly mean is a real question, and a later lesson answers it.

Worked example 3 Evaluate ∑k=25(k2−k)\displaystyle\sum_{k=2}^{5} (k^2 - k)

Read the limits first. The index runs from 22 up to 55, so the sum has 5−2+1=45 - 2 + 1 = 4 terms, and the summand k2−kk^2 - k has to be evaluated at each of k=2,3,4,5k = 2, 3, 4, 5.

Working left to right, k=2k = 2 gives 4−2=24 - 2 = 2, then k=3k = 3 gives 9−3=69 - 3 = 6, then k=4k = 4 gives 16−4=1216 - 4 = 12, and k=5k = 5 gives 25−5=2025 - 5 = 20. Adding those four results:

∑k=25(k2−k)=2+6+12+20=40.\sum_{k=2}^{5} (k^2 - k) = 2 + 6 + 12 + 20 = 40 .

The sum does not begin at k=1k = 1, and nothing requires it to. The lower limit is part of the notation, so reading it as a 11 out of habit would have thrown in the extra term 12−1=01^2 - 1 = 0. That term is harmless here, but it will not be next time.

Worked example 4 Write 12+23+34+45+56\dfrac{1}{2} + \dfrac{2}{3} + \dfrac{3}{4} + \dfrac{4}{5} + \dfrac{5}{6} in sigma notation

Describe a single term before you describe the sum. Each numerator counts up from 11, and each denominator is one more than its numerator, so the term whose numerator is kk is kk+1\frac{k}{k+1}. The numerators run from 11 to 55, which fixes the limits:

12+23+34+45+56=∑k=15kk+1.\frac{1}{2} + \frac{2}{3} + \frac{3}{4} + \frac{4}{5} + \frac{5}{6} = \sum_{k=1}^{5} \frac{k}{k+1} .

Check the ends before you trust it. At k=1k = 1 the summand is 12\frac{1}{2}, and at k=5k = 5 it is 56\frac{5}{6}, which are the first and last terms of the original sum.

Check your understanding

Evaluate ∑k=36(k2+1)\displaystyle\sum_{k=3}^{6} (k^2 + 1).

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

Go deeper (optional)

You can skip this and keep going. Read it if you want to know more.

A single explicit rule that hides four matching terms and then breaks the pattern

The repeating list 2,4,6,8,2,4,6,8,…2, 4, 6, 8, 2, 4, 6, 8, \ldots is one way to match 2,4,6,82, 4, 6, 8 without being the even numbers. Here is another, built entirely from a formula in nn, which is closer to what “a rule” usually means in this course.

The rule

an=2n+(n−1)(n−2)(n−3)(n−4)a_n = 2n + (n-1)(n-2)(n-3)(n-4)

contains a product that is built to vanish at exactly n=1,2,3,4n = 1, 2, 3, 4: each of those values makes one of the four factors 00. So at those four indices, only the 2n2n term survives, and the rule produces 2,4,6,82, 4, 6, 8, the same start as the even numbers. But at n=5n = 5, none of the four factors is 00, so the product term switches on:

a5=2(5)+(5−1)(5−2)(5−3)(5−4)=10+(4)(3)(2)(1)=10+24=34.\begin{aligned} a_5 &= 2(5) + (5-1)(5-2)(5-3)(5-4) \\ &= 10 + (4)(3)(2)(1) = 10 + 24 = 34. \end{aligned}

Both an=2na_n = 2n and this rule are perfectly good sequences, and they agree at the first four indices and disagree at the fifth. Nothing about the first four terms could have told you which one you were looking at.

Why the explicit rule and the recursion define the same sequence at every index

The explicit rule an=n2+1a_n = n^2 + 1 and the recursion a1=2a_1 = 2, an=an−1+2n−1a_n = a_{n-1} + 2n - 1 define the same sequence#

Two sequences are the same function when they have the same domain and agree at every index. So what we must show is that these two rules produce the same term at every nn.

Call the explicit sequence aa, so that an=n2+1a_n = n^2 + 1 for every positive integer nn, and call the recursive one bb, so that b1=2b_1 = 2 and bn=bn−1+2n−1b_n = b_{n-1} + 2n - 1 for every n≥2n \ge 2.

Begin at the bottom of the ladder. The explicit rule gives a1=12+1=2a_1 = 1^2 + 1 = 2, and the seed gives b1=2b_1 = 2, so the two agree at n=1n = 1.

Next, check that aa obeys the very step rule that bb was built from. For any n≥2n \ge 2,

an−an−1=(n2+1)−((n−1)2+1)=n2−(n2−2n+1)=2n−1,\begin{aligned} a_n - a_{n-1} &= (n^2 + 1) - \big((n-1)^2 + 1\big) \\ &= n^2 - (n^2 - 2n + 1) = 2n - 1, \end{aligned}

and rearranging gives an=an−1+2n−1a_n = a_{n-1} + 2n - 1, which is exactly the rule bb follows.

Now climb. Suppose the two sequences agree at some index n−1n - 1, so an−1=bn−1a_{n-1} = b_{n-1}. Each one then adds the same quantity 2n−12n - 1 to that same value to produce its next term, so an=bna_n = b_n. Agreement at any index therefore forces agreement at the next index. We already have agreement at n=1n = 1, so it propagates to n=2n = 2, and from there to n=3n = 3, and on through every positive integer. No index can be the first place the two disagree, because the value there is computed from the index below it, where by assumption they already agree.

The two rules describe the same function, so they describe the same sequence.

A sum written two different correct ways

Starting the index at 00 instead of 11, and adjusting the summand to compensate, describes the exact same sum:

∑k=15kk+1  =  ∑j=04j+1j+2.\sum_{k=1}^{5} \frac{k}{k+1} \;=\; \sum_{j=0}^{4} \frac{j+1}{j+2} .

Check a couple of terms to see why: at j=0j = 0 the second sum’s summand is 12\frac{1}{2}, matching the first sum’s term at k=1k = 1; at j=4j = 4 it is 56\frac{5}{6}, matching k=5k = 5. Both versions produce the same five terms in the same order. Sigma notation is a way of writing a sum, not a fingerprint of it, so a sum can always be written in more than one equivalent way. Prefer whichever version has the simplest summand.

A bit of history (optional)

Before the symbol arrived, a long sum had to be described rather than written down. An author named the pattern in a sentence, or set out a few terms and trailed off into dots. Dots are an instruction to guess. They promise that the pattern continues, and then leave the reader to work out how.

Leonhard Euler, a Swiss mathematician, introduced the symbol in 1755. He borrowed the Greek capital SS, the letter sigma, and made it stand for the Latin word summa, meaning sum. He used it in his textbook on the calculus. The choice looks obvious now, but at the time it was not: earlier mathematicians had tried other shorthand for a long sum, none of which caught on the way Euler’s sigma eventually did.

What the sigma really adds is not brevity, though it is certainly shorter. It is the limits. The finished notation states where the index begins, where it stops, and which term is evaluated at each step. Nothing whatever is left to the reader’s judgment. A phrase that had depended on the goodwill of whoever read it became an instruction a machine could execute.

So the parts of the symbol deserve the attention this lesson gave them. The upper limit, the lower limit and the summand are not trim around a sum sign. They are the entire content of Euler’s improvement. The index perched underneath belongs to nobody, since renaming it changes nothing at all.