Lists with a rule

A sequence is sim­ply an ordered list of num­bers, and the inter­est­ing ones fol­low a rule. There are two ways to state that rule. An explicit for­mula works out any term straight from its posi­tion. A recur­sive for­mula builds each term from the ones before it. In this les­son you will learn the nota­tion, see both kinds of rule at work, and meet the Virahāṅka sequence, in which each term is the sum of the two before it.

Sequences and terms

1,3,5,7,9,…1,4,9,16,25,…1,3,6,10,15,…1, 3, 5, 7, 9, \ldots \qquad 1, 4, 9, 16, 25, \ldots \qquad 1, 3, 6, 10, 15, \ldots

Each of these is a sequence, and each num­ber in it is a term. The dots at the end mean it goes on for ever, so it is an infi­nite sequence. A list that stops, such as 5,10,20,40,805, 10, 20, 40, 80, is finite.

We name terms by their posi­tion. t1t_1 is the first, t2t_2 the sec­ond, and tnt_n the nn-th. For the odd num­bers, t1=1t_1 = 1 and t4=7t_4 = 7. We use dif­fer­ent let­ters, such as sns_n or unu_n, for dif­fer­ent sequences. The posi­tion nn is always a nat­ural num­ber, but the term itself can be any­thing: neg­a­tive, a frac­tion, a dec­i­mal.

The tri­an­gu­lar num­bers 1,3,6,10,15,…1, 3, 6, 10, 15, \ldots are the run­ning totals of 1+2+3+⋯1 + 2 + 3 + \cdots. A tri­an­gle of dots with nn rows has tnt_n dots. The square num­bers are the run­ning totals of the odd num­bers, as in 1+3+5+7=161 + 3 + 5 + 7 = 16. You can see why in the pic­ture: an LL-shaped bor­der of 2n−12n - 1 dots turns an (n−1)(n-1)-square into an nn-square.

Triangles of dots with 1, 2, 3, 4 and 5 rows holding 1, 3, 6, 10 and 15 dots: the first five triangular numbers, each the running total 1 + 2 + 3 and so on.
The tri­an­gu­lar num­bers as tri­an­gles of dots.
Squares of dots of side 1 to 5 holding 1, 4, 9, 16 and 25 dots; each new L-shaped border, in its own colour, adds the next odd number 1, 3, 5, 7, 9.
Each square num­ber is a sum of odd num­bers.

Explicit rules

An explicit rule gives tnt_n as a for­mula in nn. Its great strength is that you can jump straight to any term.

Exam­ple 1. un=2n−1u_n = 2n - 1 gives u1=1,u2=3,u3=5u_1 = 1, u_2 = 3, u_3 = 5: the odd num­bers. So the 5050th odd num­ber is u50=99u_{50} = 99, and the 10001000th is 19991999. You do not need to write out the first 999999 to get there.

Exam­ple 2. sn=4n+3s_n = 4n + 3: 7,11,15,19,23,…7, 11, 15, 19, 23, \ldots The 100100th term is 403403.

Is a num­ber in the sequence? Set sn=s_n = that num­ber, solve, and check whether nn comes out as a nat­ural num­ber.

Exam­ple 3. Is 239239 a term of sn=4n+3s_n = 4n + 3? Solv­ing 4n+3=2394n + 3 = 239 gives n=59n = 59, so yes, it is the 5959th term. What about 250250? Then 4n=2474n = 247 and n=61.75n = 61.75. So no, because there is no such thing as a 61.7561.75th term.

Exam­ple 4. For tn=3n−8t_n = 3n - 8, the first three terms are −5,−2,1-5, -2, 1, and the 2020th is 5252. Which term is 121121? From 3n=1293n = 129 we get n=43n = 43. Is 200200 a term? That would need 3n=2083n = 208, which is not a mul­ti­ple of 33, so no.

Exam­ple 5. For square num­bers the rule is tn=n2t_n = n^2. For tri­an­gu­lar num­bers it is tn=n(n+1)2\displaystyle t_n = \dfrac{n(n + 1)}{2}, which we prove in the next les­son. Check: t5=15t_5 = 15 ✓.

Not every sequence has a rule you can use. The primes 2,3,5,7,11,13,…2, 3, 5, 7, 11, 13, \ldots are per­fectly def­i­nite, and yet no sim­ple, prac­ti­cal for­mula pro­duces the nn-th prime from nn.

Recur­sive rules

A recur­sive rule tells you the first term, or the first few, and then how to get each term from the one or ones before it.

The sequence 1,4,7,10,…1, 4, 7, 10, \ldots has the explicit rule tn=3n−2t_n = 3n - 2 and also the recur­sive rule

t1=1,tn=tn−1+3 for n≥2t_1 = 1, \qquad t_n = t_{n-1} + 3 \text{ for } n \geq 2

The catch is that a recur­sive rule needs the ear­lier terms. You can­not jump straight to t100t_{100} with­out first com­put­ing t99t_{99}.

Exam­ple 6. u1=2u_1 = 2, un=3un−1−1u_n = 3u_{n-1} - 1. Then u2=5u_2 = 5, u3=14u_3 = 14, u4=41u_4 = 41 and u5=122u_5 = 122. Is 365365 a term? Work­ing one more step gives u6=365u_6 = 365, so yes, it is the sixth.

Exam­ple 7. s1=2s_1 = 2, sn=sn−1(sn−1+1)s_n = s_{n-1}(s_{n-1} + 1). Then s2=6s_2 = 6, s3=42s_3 = 42 and s4=1806s_4 = 1806. Look how fast the terms explode!

Exam­ple 8. t1=−7t_1 = -7, tn+1=tn+4t_{n+1} = t_n + 4: −7,−3,1,5,9,…-7, -3, 1, 5, 9, \ldots In explicit form this is tn=4n−11t_n = 4n - 11. Is 6161 a term? From 4n=724n = 72 we get n=18n = 18, so yes.

The Virahāṅka sequence

A rule can also use the pre­vi­ous two terms. For exam­ple,

V1=1,V2=2,Vn=Vn−1+Vn−2 for n≥3V_1 = 1, \quad V_2 = 2, \quad V_n = V_{n-1} + V_{n-2} \text{ for } n \geq 3

gives 1,2,3,5,8,13,21,34,…1, 2, 3, 5, 8, 13, 21, 34, \ldots, where each term is the sum of the two before it. Virahāṅka wrote it down in the sev­enth cen­tury CE while count­ing the rhythms of Prakrit poetry. Gopāla and Hemacan­dra stud­ied it around 1150, and Fibonacci in Italy around 1200. It turns up all over math­e­mat­ics and nature, and you will meet it again in later classes.

Bar chart of the first eight Virahanka numbers V1 to V8: 1, 2, 3, 5, 8, 13, 21 and 34, each bar from the third on marked as the sum of the two before it.
Each Vira­hanka num­ber is the sum of the two before it.

A rule can even reach back three terms or more. For instance, T1=1,T2=1,T3=2T_1 = 1, T_2 = 1, T_3 = 2, Tn=Tn−1+Tn−2+Tn−3T_n = T_{n-1} + T_{n-2} + T_{n-3} gives 1,1,2,4,7,13,24,…1, 1, 2, 4, 7, 13, 24, \ldots

Prac­tice

  1. Write the first five terms of (a) tn=4n−5t_n = 4n - 5; (b) tn=3−2nt_n = 3 - 2n; (c) tn=n2+nt_n = n^2 + n; (d) tn=1n+1\displaystyle t_n = \dfrac{1}{n + 1}.
  2. For tn=6n−1t_n = 6n - 1 find t12t_{12} and t25t_{25}, and decide whether 149149 and 200200 are terms.
  3. Which term of tn=7n+2t_n = 7n + 2 is 373373?
  4. A sequence has t1=5t_1 = 5 and tn+1=tn−3t_{n+1} = t_n - 3. Write five terms, give an explicit rule, and find which term is −40-40.
  5. u1=3u_1 = 3, un=2un−1+1u_n = 2u_{n-1} + 1. Find u2u_2 to u6u_6. Is 127127 a term?
  6. Write the next four terms of the Virahāṅka sequence after 3434.
  7. T1=2T_1 = 2, T2=3T_2 = 3, T3=5T_3 = 5, Tn=Tn−1+Tn−2+Tn−3T_n = T_{n-1} + T_{n-2} + T_{n-3}. Find T4T_4 to T7T_7.
  8. Give an explicit rule for 2,6,12,20,30,…2, 6, 12, 20, 30, \ldots (Hint: com­pare with n2n^2.)

Answers

Show answers
  1. (a) −1,3,7,11,15-1, 3, 7, 11, 15. (b) 1,−1,−3,−5,−71, -1, -3, -5, -7. (c) 2,6,12,20,302, 6, 12, 20, 30. (d) 12,13,14,15,16\displaystyle \dfrac{1}{2}, \dfrac{1}{3}, \dfrac{1}{4}, \dfrac{1}{5}, \dfrac{1}{6}.
  2. 7171; 149149. 6n−1=1496n - 1 = 149 gives n=25n = 25: yes. 6n=2016n = 201: not a mul­ti­ple of 66: no.
  3. 7n=3717n = 371, n=53n = 53.
  4. 5,2,−1,−4,−75, 2, -1, -4, -7. tn=8−3nt_n = 8 - 3n. 8−3n=−408 - 3n = -40, n=16n = 16.
  5. 7,15,31,63,1277, 15, 31, 63, 127. Yes: u6=127u_6 = 127.
  6. 55,89,144,23355, 89, 144, 233.
  7. T4=10T_4 = 10, T5=18T_5 = 18, T6=33T_6 = 33, T7=61T_7 = 61.
  8. tn=n2+n=n(n+1)t_n = n^2 + n = n(n + 1).