Skip to content

Sequences and Series Basics

In this lesson you’ll learn the fundamentals of sequences and series: what they are, how partial sums work, and the critical distinction between convergence and divergence.

A sequence is an ordered list of numbers, usually defined by a formula

a1,a2,a3,written as {an}a_1,\, a_2,\, a_3,\, \dots \quad \text{written as } \{a_n\}

The big question is: what happens as n gets large? If the terms approach a specific number L, the sequence converges to L. If they don’t settle down, the sequence diverges.

A series is what you get when you add up the terms of a sequence

n=1an=a1+a2+a3+\sum_{n=1}^{\infty} a_n = a_1 + a_2 + a_3 + \cdots

You can’t literally add infinitely many numbers at once. Instead, define the nth partial sum

Sn=a1+a2++anS_n = a_1 + a_2 + \cdots + a_n

The series converges if the sequence of partial sums has a finite limit. If the partial sums keep growing or oscillating without settling, the series diverges.

Geometric series with first term a and common ratio r

n=0arn=a1rwhen r<1\sum_{n=0}^{\infty} ar^n = \frac{a}{1 - r} \quad \text{when } |r| \lt 1

This converges only when the absolute value of r is less than 1. If r is 1 or larger, the terms don’t shrink and the sum blows up.

Harmonic series

n=11n=1+12+13+14+\sum_{n=1}^{\infty} \frac{1}{n} = 1 + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \cdots

This one diverges, even though the terms go to zero. The terms shrink too slowly for the sum to stay finite.

Example 1: Limit of a sequence

Find the limit of the sequence n/(n + 1) as n approaches infinity.

Divide numerator and denominator by n

limnnn+1=limn11+1n=11+0=1\lim_{n \to \infty} \frac{n}{n + 1} = \lim_{n \to \infty} \frac{1}{1 + \frac{1}{n}} = \frac{1}{1 + 0} = 1

The terms get closer and closer to 1 but never quite reach it: 1/2, 2/3, 3/4, 4/5, …

Example 2: Geometric series

Find the sum of the series

n=1(12)n=12+14+18+116+\sum_{n=1}^{\infty} \left(\frac{1}{2}\right)^n = \frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \frac{1}{16} + \cdots

This is geometric with first term a = 1/2 and ratio r = 1/2. Since r is less than 1 in absolute value, it converges

S=a1r=12112=1212=1S = \frac{a}{1 - r} = \frac{\frac{1}{2}}{1 - \frac{1}{2}} = \frac{\frac{1}{2}}{\frac{1}{2}} = 1

The partial sums approach 1: 0.5, 0.75, 0.875, 0.9375, … getting closer with each term.

The blue dots (geometric series) level off at 1. The red dots (harmonic series) keep climbing, even though they slow down. That’s the difference between convergence and divergence.

Example 3: The harmonic series diverges

Show that the harmonic series diverges.

Group the terms

1+12+(13+14)+(15+16+17+18)+1 + \frac{1}{2} + \left(\frac{1}{3} + \frac{1}{4}\right) + \left(\frac{1}{5} + \frac{1}{6} + \frac{1}{7} + \frac{1}{8}\right) + \cdots

Each group sums to at least 1/2

13+1414+14=12\frac{1}{3} + \frac{1}{4} \geq \frac{1}{4} + \frac{1}{4} = \frac{1}{2} 15+16+17+1818+18+18+18=12\frac{1}{5} + \frac{1}{6} + \frac{1}{7} + \frac{1}{8} \geq \frac{1}{8} + \frac{1}{8} + \frac{1}{8} + \frac{1}{8} = \frac{1}{2}

Since you keep adding at least 1/2 with each doubling group, the partial sums grow without bound. The series diverges even though the individual terms go to zero. This is a classic example showing that terms going to zero is necessary but not sufficient for convergence.

Sequences and series are everywhere in computing and science:

  • Game engines use Taylor series to approximate trig functions and square roots quickly
  • Fourier series decompose sound waves and images into frequency components
  • Algorithm analysis uses series to measure total running time of loops
  • Finance uses geometric series for compound interest and annuity calculations
  • Machine learning uses convergent iterative methods (gradient descent) that are analyzed with series
A series $\sum a_n$ converges if
The geometric series $\sum ar^n$ converges when
The sum of $\sum_{n=1}^{\infty} (1/2)^n$ is
The harmonic series $\sum 1/n$
The limit of the sequence $\frac{n}{n+1}$ as $n \to \infty$ is