Index Ai Academy
Foundation · Foundation mathTransposition of formulas

Sequences and sums: find n, a, d and r

About 40 minLooking ahead: some prerequisites aren't done yet

Why this matters

A sequence formula answers "what is the 10th term?" Planning asks the other way around. In which week does the walk reach 21 km? How many steps until a token budget runs out? What decay gives a 50-step average? Each is the same formula with a different letter as the subject, and n must come out a positive whole number.

  • Make n, a or d the subject of an arithmetic term formula, and l or n the subject of its sum
  • Solve an arithmetic sum for n as a quadratic, keeping the positive whole root
  • Free n with logs and r with a root in a geometric sequence, and r from an infinite sum with |r| < 1
  • Check that n is a positive whole number, say what it means when it isn't, and confirm with a loop
  • Turn around an average's window, a discounted return, a step schedule and a growing batch's token budget
Quick check
Have a guess before you start. The trail club's training plan starts with a 3 km walk and adds 2 km each week. In which week is the walk 21 km?

The math: peel the term, solve the sum

Purpose. Make any letter of a sequence formula the subject: the position n, the first term a, the step d or the ratio r.

From lesson 26: an arithmetic sequence starts at a and adds the same step d each time, so its nth term is a + (n − 1)d. Here that term gets a name, uₙ ("u sub n"), with a subscript for its position: uₙ = a + (n − 1)d. Some books write aₙ, and call d the common difference (and a geometric sequence's r the common ratio).

Read it as a machine on n: take 1 away, multiply by d, add a. To free n, undo those in reverse: take a away, divide by d, add 1. So n = (uₙ − a)/d + 1. The other letters take fewer moves: d = (uₙ − a)/(n − 1) and a = uₙ − (n − 1)d.

Conditions. d can't be 0, or every term is the same. When you solve for d, n can't be 1. And n counts terms, so it must be a positive whole number.