Number Sequence
calculator.
List the terms and sums of triangular, square, prime, Fibonacci and other sequences.
- Sum of 10 terms
- 220
- First term
- 1
55 dots make a triangle with 10 rows. Each row has one more dot than the row above, which is why the gaps between terms grow by 1.
The first 10 terms
Drag the point to pick a termThe first 10 terms, from 1 to 55. Term 10 is 55.
Term 8 as dots
36 dots; pick a term up to 8 to see a smaller one. The last dot added is in the second colour.
Working
- 1The rule for term nT(n) =n(n + 1)2
- 2Put n = 10 into the ruleT(10) =10 × 112= 55
- 3The sum rule with your numbersSum =10 × 11 × 126= 220
- 4Check: add the listed terms one by one1 + 3 + 6 + 10 + … = 220
Triangular terms with the sum so far
| n | Term | Sum so far |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 3 | 4 |
| 3 | 6 | 10 |
| 4 | 10 | 20 |
| 5 | 15 | 35 |
| 6 | 21 | 56 |
| 7 | 28 | 84 |
| 8 | 36 | 120 |
| 9 | 45 | 165 |
| 10 | 55 | 220 |
Is a number in the triangular sequence?
55 is term 10 of the sequence.
How it's worked out
Pick a family of numbers and how many terms you want. Each family has a rule for term n and, for most, a rule for the sum of the first n terms. Whole-number families are worked out exactly, with no rounding at any size.
Triangular numbers count dots in a triangle: 1, then 1 + 2, then 1 + 2 + 3, and so on. OEIS A000217 gives the rule below, so the 10th is 55. Adding up the triangular numbers gives the tetrahedral numbers, the count of balls in a triangular pyramid.
Cubes add up to a square. The first n cubes always add to the square of T(n). The first 10 cubes add to 3,025, which is 55 squared. A pentagonal number is a square with a triangle on top, so P(6) is 36 plus T(5) = 15, which makes 51.
Fibonacci and Lucas numbers follow the same rule, each term the sum of the two before it, but start differently. Fibonacci runs 1, 1, 2, 3 and Lucas runs 2, 1, 3, 4. Their sums have a short cut: the first 12 Fibonacci numbers add to F(14) − 1, which is 376, and the first 10 Lucas numbers add to 198.
Primes have no rule for term n. The tool sieves for them: it crosses out every multiple of 2, 3, 5 and so on up to a limit. For 100 primes it sieves up to 614 and finds 112, then keeps the first 100. Prime number 100 is 541. OEIS A000040 notes that the nth prime grows like n times the natural log of n.
Arithmetic and geometric sequences take your own first term and step. An arithmetic one adds the same difference d each time, and a geometric one multiplies by the same ratio r. OpenStax College Algebra gives the sum rules, and an endless geometric sum settles only when r is between −1 and 1.
Worked examples
Ivan stacks cans for a store display
Ivan builds a flat triangle of cans against a wall, 10 rows high, with one can on top. That takes T(10) = 55 cans.
Next week he wants a free-standing pyramid, 10 layers deep, each layer a triangle. That is the sum of the first 10 triangular numbers, 220 cans, and it matches the 10th tetrahedral number, 220.
A ball that bounces to half its height
In a physics model, a ball falls 1 m and each bounce reaches half the height of the one before. The drops form a geometric sequence with a first term of 1 and a ratio of 0.5. The 10th drop is 0.001953125 m.
The first 10 drops add to 1.998046875 m. Because the ratio is between −1 and 1, the total never passes 2 m, however many bounces you count. Real balls lose a different share of height each time, so treat the model as a first guess.
Is 5,050 a triangular number?
A puzzle asks for the total of the whole numbers from 1 to 100. That total is a triangular number, and looking up 5,050 shows it is term 100.
So the list of 100 triangular numbers ends at 5,050. A number that is not triangular gets its neighbors instead: 50 falls between 45 and 55.
Reading your result
Every list starts at term 1 except Lucas. The Lucas list follows the OEIS and starts at L(0) = 2, so its 10 terms run from L(0) to L(9). The same shift explains why its sum rule uses L(n + 1).
Two neighbors make a square. T(9) and T(10) are 45 and 55, and together they make 100, which is 10 squared. Fitting two dot triangles together into a square shows why this always works.
Long terms stay exact. The 500th Fibonacci number has 105 digits and the 500th power of 2 has 151, and both are given to the last digit. The answer shows long numbers to 5 significant figures, and the table and export carry every digit.
Your own sequences use decimals. Arithmetic and geometric terms are rounded to 12 significant figures to clear the tiny errors decimals pick up. The first 10 odd numbers, from a first term of 1 and a difference of 2, end at 19 and add to 100.
Common mistakes
- Using n instead of n − 1. Term 1 has had no steps added, so term n has n − 1 of them. Writing a₁ + n × d lands one term too far.
- Dividing by zero when r = 1. The geometric sum rule divides by 1 − r. When every term is the same, just multiply: 4 terms of 5 add to 20.
- Adding an endless geometric sequence that grows. With r = 2 the terms double for ever, so there is no sum to infinity at all.
- Counting 1 as a prime. A prime has exactly two divisors, so the list starts at 2.
- Mixing up the index of Lucas numbers. L(0) = 2 and L(1) = 1, so the 10th term in this list is L(9), not L(10).