Sequences and Series
A sequence lists numbers in order while a series adds them up, so one names the steps and the other names the running total.
Why Does This Exist?
Training logs, loss curves, and iterative algorithms all produce ordered numbers, and the questions asked of them split two ways: "what is the next value?" versus "what do they add up to?" Sequences serve the first, series the second. Gradient descent iterates a sequence of parameters; total training cost sums a series of per-step costs; infinite series define the functions models compute.
Blurring the two corrupts both: treating a running total as the next term double-counts, and treating terms as totals misses accumulation. This page fixes the distinction with one shared example carried through every section. Convergence questions continue in series and convergence; the famous families are in arithmetic and geometric sequences.
The one idea you need first
A sequence is an ordered list where position matters: names the -th term. A series is the sum of a sequence's terms. The -th partial sum is the series stopped at : finite, computable, and the bridge between listing and totaling.
Think of It Like This
Daily deposits versus the bank balance
Each morning you deposit some cash: Monday 2, Tuesday 4, Wednesday 8, Thursday 16. The deposit slips are the sequence: individual events in order. The bank balance after each day is the series of partial sums: 2, 6, 14, 30. Ask "what arrived Thursday?" and you read a slip; ask "what have we saved?" and you read the balance.
Confusing them buys trouble: handing someone Thursday's slip when they asked for total savings understates by 14. The analogy stops at infinity: bank balances stop at today, while series ask what the balance approaches if deposits continue forever.
How It Actually Works
Given terms , the two objects and their notations are:
In plain words: the sequence parents the terms in order; (capital S) adds the first of them with the (sigma) notation naming start, end, and rule; the infinite series is the limit of those running totals if they settle. The sequence asks "what is ?"; the series asks "where do the totals head?" Different questions, different answers, same raw material.
Finite sums need no limits: is exact arithmetic. Infinity enters only when asking whether endless totals converge or escape, which belongs to the convergence page.
Worked example
Take for : terms .
- Partial sums: ; ; ; .
- Next step predicts: , so . Terms double, totals nearly double (minus 2).
- Closed form check: . At : . Matches.
The sequence grows by doubling; the series grows alongside, always behind the next term. One rule, two views, zero contradiction.
Code
Build terms and totals side by side and confirm the closed form.
import numpy as np
terms = 2 ** np.arange(1, 5) # [2, 4, 8, 16]totals = np.cumsum(terms) # running sumsprint(terms) # -> [ 2 4 8 16]print(totals) # -> [ 2 6 14 30]print(2 ** 5 - 2) # -> 30Terms, running totals, and formula agree at 30: listing and accumulating reconciled in five lines.
Watch Out For
Plotting terms where totals belong
A loss "curve" that plots per-batch loss looks spiky and alarming; the cumulative training cost tells the budget story. Teams have restarted healthy runs after reading term noise as total divergence.
Label which object every chart shows: per-step value or running accumulation. If a trend looks wrong, check whether the axes show slips or balances before touching hyperparameters.
Assuming totals inherit term behavior
Terms shrinking to zero does not guarantee totals settle: the harmonic terms vanish while their totals grow without bound. "Each step is tiny" never implies "the sum is small."
Test totals directly for the question asked. If convergence matters, run the convergence checks rather than eyeballing term sizes.
The Quick Version
- Sequences list terms in order; series add them into running totals.
- Partial sum is the series stopped at : finite and exact.
- Terms give totals , with .
- Infinite series ask where totals head, which needs convergence tools.
- Chart labels must say per-step or cumulative: slips versus balances.
- Shrinking terms never guarantee settling totals; check the sums themselves.