SigmaField
Mathematical Foundations for Quant Finance
0 of 256 lessons
      1. 1.5.1 SequencesConcept · 25 min
      2. 1.5.2 Arithmetic and geometric seriesConcept · 20 min
      3. 1.5.3 Infinite series and when they convergeConcept · 25 min
      4. 1.5.4 Practice set: seriesPractice set · 20 min
      5. 1.5.5 Case study: annuities, perpetuities and bond pricesCase study · 35 min

Level 1, Precalculus 1.5 Sequences and series Lesson 1 of 5

ConceptLesson 1.5.1 in Level 1, Precalculus. About 25 minutes.

Sequences

What a sequence is

A sequence is a list of numbers in a fixed order. Each number is a term, and ana_n is the term in position nn, as with the subscripts of lesson 0.2.1. Positions are whole numbers, usually starting at 1.

For an=2n+1a_n = 2n + 1 the terms are 3, 5, 7, 9, … The fourth term is a4=2×4+1=9a_4 = 2 \times 4 + 1 = 9.

The terms carry the units of whatever they measure, such as dollars or metres. The position nn is a count and has no units.

A sequence is a function whose inputs are 1,2,3,…1, 2, 3, \ldots (lesson 1.1.1). So its graph is a row of separate dots: nothing sits between positions 2 and 3.

Two ways to define a sequence

An explicit definition gives a formula for ana_n in terms of nn. You can jump straight to any term: for an=2n+1a_n = 2n + 1, the 100th term is 201.

A recursive definition gives a first term and a rule that builds each term from the one before. The rule a1=3a_1 = 3, an+1=an+2a_{n+1} = a_n + 2 makes the same 3, 5, 7, 9, … To reach the 100th term this way, you must build all 99 terms before it.

Rule: Explicit and recursive

explicit: an=2n+1recursive: a1=3,  an+1=an+2\begin{gathered} \text{explicit: } a_n = 2n + 1 \\ \text{recursive: } a_1 = 3, \ \ a_{n+1} = a_n + 2 \end{gathered}

Read an+1a_{n+1} as "the next term". A recursive rule needs a starting term, or it defines nothing.

A recursive rule can hide a formula. With a1=1a_1 = 1 and an+1=2an+1a_{n+1} = 2a_n + 1, the terms are 1, 3, 7, 15, 31, 63. Each is one less than a power of 2, so an=2n−1a_n = 2^n - 1.

Try it

The explicit formula is one list comprehension. The recursive rule is a loop that keeps the latest term and appends the next one.

Both print 3, 5, 7, 9, 11, 13. The last two lines check that 2an+12a_n + 1 from a1=1a_1 = 1 gives 2n−12^n - 1.

⌘/Ctrl + Enter runs the cell

Arithmetic sequences

Start at 3 and add 4 each time: 3, 7, 11, 15, 19. Adding the same common difference dd at every step makes an arithmetic sequence. The difference can be positive, negative or zero.

Rule: Arithmetic sequence

an=a1+(n−1) dan+1=an+d\begin{gathered} a_n = a_1 + (n - 1)\,d \\ a_{n+1} = a_n + d \end{gathered}

To reach term nn you add dd exactly n−1n - 1 times. The first term a1a_1 needs no steps at all.

For 3, 7, 11, …, the 20th term is 3+19×4=793 + 19 \times 4 = 79. To find which term equals 99, solve 3+4(n−1)=993 + 4(n - 1) = 99, as in lesson 0.3.2. That gives n−1=24n - 1 = 24, so 99 is the 25th term.

A negative difference makes the terms fall. In 50, 46, 42, … the difference is −4-4. The first negative term needs 50−4(n−1)<050 - 4(n - 1) < 0, so n>13.5n > 13.5: it is the 14th term, −2-2.

On a graph, the dots of an arithmetic sequence lie on a straight line with slope dd (lesson 1.2.1).

Geometric sequences

Start at 5 and double each time: 5, 10, 20, 40, 80. Multiplying by the same common ratio rr at every step makes a geometric sequence. The ratio is never 0.

Rule: Geometric sequence

an=a1 r n−1an+1=r an\begin{gathered} a_n = a_1\, r^{\,n - 1} \\ a_{n+1} = r\, a_n \end{gathered}

To reach term nn you multiply by rr exactly n−1n - 1 times. The 10th term of 5, 10, 20, … is 5×29=25605 \times 2^9 = 2560.

Growth by a fixed percentage is geometric (lesson 1.4.2). Growing by 10% a step means r=1.1r = 1.1: 100, 110, 121, 133.1. Shrinking by 20% a step means r=0.8r = 0.8.

A negative ratio flips the sign at every step. With a1=8a_1 = 8 and r=−12r = -\tfrac{1}{2} the terms are 8,−4,2,−1,0.5,…8, -4, 2, -1, 0.5, \ldots

Telling them apart

Subtract each term from the next. If the differences are all equal, the sequence is arithmetic. If instead the ratios an+1/ana_{n+1} / a_n are all equal, it is geometric.

sequencedifferencesratiostype
2, 6, 10, 144, 4, 43, 1.67, 1.4arithmetic
2, 6, 18, 544, 12, 363, 3, 3geometric
1, 4, 9, 163, 5, 74, 2.25, 1.78neither

Try it

zip(s, s[1:]) pairs each term with the next one. Then a difference is b - a and a ratio is b / a.

The cell rounds the ratios to 4 places; the table rounds them to 2.

⌘/Ctrl + Enter runs the cell

Increasing, decreasing and alternating

A sequence is increasing if every term is bigger than the one before: an+1>ana_{n+1} > a_n. It is decreasing if every term is smaller: an+1<ana_{n+1} < a_n. It is alternating if the signs switch at every step.

The test is the sign of the step an+1−ana_{n+1} - a_n. For an arithmetic sequence the step is dd. For a geometric sequence with a positive first term:

  • r>1r > 1: increasing, as in 5, 10, 20, …
  • 0<r<10 < r < 1: decreasing, as in 10, 8, 6.4, …
  • r=1r = 1: constant, every term the same
  • r<0r < 0: alternating, as in 8,−4,2,…8, -4, 2, \ldots

Watch the sign of the first term. With a1=−1a_1 = -1 and r=2r = 2 the terms are −1,−2,−4,−8-1, -2, -4, -8: they grow in size but decrease. Some sequences are none of these: an=(n−3)2a_n = (n - 3)^2 gives 4, 1, 0, 1, 4, falling and then rising.

Four sequences as dots. Two have a limit, 0; the other two have none, one because it grows for ever and one because it never settles.

The limit of a sequence

A sequence has the limit LL if its terms get as close to LL as you like and then stay that close. You write an→La_n \to L, read "ana_n tends to LL", or lim⁡n→∞an=L\lim_{n \to \infty} a_n = L. A sequence with a limit converges; one without a limit diverges.

Take an=n+1na_n = \frac{n + 1}{n}. Its terms fall towards 1.

nn125101001000
ana_n21.51.21.11.011.001
distance from 110.50.20.10.010.001

Algebra explains the table: n+1n=1+1n\frac{n + 1}{n} = 1 + \frac{1}{n}, so the distance from 1 is exactly 1n\frac{1}{n}. It is less than 0.1 once n>10n > 10, and less than 0.01 once n>100n > 100. However small the tolerance, from some term on every term is that close.

The band reaches 0.1 either side of the limit 1. The 10th term sits on its edge; from the 11th on, every term is inside, and none ever leaves.

Rule: Limit of a sequence

an→Lorlim⁡n→∞an=L\begin{gathered} a_n \to L \quad\text{or}\quad \lim_{n \to \infty} a_n = L \end{gathered}

For every tolerance, however small, there is a term after which all the terms lie within that tolerance of LL. Proof Gym stage PG4 makes this precise.

The four sequences pictured in the previous section show the remaining cases.

  • Alternating can converge. In 8,−4,2,−1,…8, -4, 2, -1, \ldots the terms land on both sides of 0, ever closer. The limit is 0.
  • Bouncing is not converging. −1,1,−1,1,…-1, 1, -1, 1, \ldots keeps visiting 1 but always leaves again, so it has no limit.
  • Growing without end is diverging. For 3,7,11,…3, 7, 11, \ldots there is no LL to approach. You write an→∞a_n \to \infty.

A limit need not be reached: 1+1n1 + \frac{1}{n} is never exactly 1. It may be reached, too: the constant sequence 5, 5, 5, … has limit 5.

Try it

The loop reprints the table. The last column, rounded to 6 places, is the distance 1n\frac{1}{n}.

The while loop finds the first term closer than 0.01 to the limit. It keeps going while 1n\frac{1}{n} is at least 0.01, and stops at 101.

⌘/Ctrl + Enter runs the cell

Where rnr^n goes

Powers of a ratio, r,r2,r3,…r, r^2, r^3, \ldots, form the simplest geometric sequence. What they do depends only on rr.

rrfirst termsbehaviourlimit
22, 4, 8, 16increasingnone: rn→∞r^n \to \infty
11, 1, 1, 1constant1
0.50.5, 0.25, 0.125, 0.0625decreasing0
−0.5-0.5−0.5-0.5, 0.25, −0.125-0.125, 0.0625alternating0
−1-1−1-1, 1, −1-1, 1alternatingnone
−2-2−2-2, 4, −8-8, 16alternatingnone

Rule: Powers of the ratio

∣r∣<1: rn→0r=1: rn=1r>1: rn→∞r≤−1: no limit\begin{gathered} |r| < 1: \ r^n \to 0 \\ r = 1: \ r^n = 1 \\ r > 1: \ r^n \to \infty \\ r \le -1: \ \text{no limit} \end{gathered}

The size ∣r∣|r| (lesson 0.3.3) decides. Below 1, each step shrinks the terms towards 0; at or above 1, they never shrink. The sign of rr only decides whether they alternate.

The same holds for a1rn−1a_1 r^{n-1}: multiplying every term by a fixed a1a_1 does not change where they go. The next two lessons rest on the first line of the rule, and case study 1.5.5 uses it to price payments that never stop.

Try it

The first loop prints the table's first five powers.

The second counts how many steps rnr^n needs to drop below 0.001. With r=0.5r = 0.5 it takes 10; with 0.9, 66; with 0.99, 688.

Ratios near 1 shrink slowly. Lesson 1.5.3 finds such counts with logarithms.

⌘/Ctrl + Enter runs the cell

Common mistakes

  1. Term nn needs n−1n - 1 steps, not nn. The first term is a1a_1 itself.
  2. Arithmetic adds; geometric multiplies. Check the differences and the ratios before using a formula: 1, 4, 9, 16 is neither.
  3. Increasing is about the terms, not their size. −1,−2,−4-1, -2, -4 has ratio 2 but is decreasing.
  4. A negative ratio alternates. It converges only when ∣r∣<1|r| < 1: (−0.5)n→0(-0.5)^n \to 0, but (−2)n(-2)^n has no limit.
  5. Getting close once is not a limit. −1,1,−1,…-1, 1, -1, \ldots hits 1 again and again, but leaves each time. The terms must stay close.
  6. A recursive rule needs its first term. an+1=an+2a_{n+1} = a_n + 2 alone does not say where to start.

Sequences

0 of 12 correct

  1. 1.
  2. 2.
  3. 3.
  4. 4.
  5. 5.
  6. 6.
  7. 7.
  8. 8.
  9. 9.
  10. 10.
  11. 11.
  12. 12.
How to type answers
  • Powers with ^: x^7, 2^(1/3), a^-2.
  • Multiply with * or by writing side by side: 3x^2, 2(x+1).
  • ln(x) is the natural log, log(x, 2) is log base 2, e is Euler's number, sqrt(x) is a square root.
  • sin(x), cos(x) and tan(x) take radians; write pi for π and sin(x)^2 for sin²x.
  • Your first answer to each question is saved: it counts towards your score and brings the question back for review.
  • Exact answers like ln(20)/ln(3) are best. Decimals need about 4 significant figures.

Summary card

  • A sequence is an ordered list a1,a2,…a_1, a_2, \ldots, given explicitly (a formula for ana_n) or recursively (a first term and a rule for an+1a_{n+1}).
  • Arithmetic: add dd each step, an=a1+(n−1)da_n = a_1 + (n - 1)d. Geometric: multiply by rr each step, an=a1rn−1a_n = a_1 r^{n - 1}.
  • Equal differences mean arithmetic; equal ratios mean geometric.
  • Increasing, decreasing or alternating: look at the sign of an+1−ana_{n+1} - a_n, or of the terms.
  • an→La_n \to L: from some term on, every term stays within any tolerance of LL. A limit need not be reached.
  • rn→0r^n \to 0 when ∣r∣<1|r| < 1; rn=1r^n = 1 when r=1r = 1; otherwise rnr^n has no limit.

Free further reading

Optional. This lesson covers what you need; these add more examples and practice. All are free to read.