# Arithmetic, geometric and Fibonacci sequence calculator

> The nth term and the sum of the first n terms of an arithmetic or geometric sequence, the sum to infinity, and exact Fibonacci numbers, with a table.

Interactive version: https://www.calcopenly.com/math/sequence-calculator
Subject: Math calculators

An arithmetic sequence adds a fixed difference d at each step, so aₙ = a₁ + (n − 1)d and the first n terms sum to Sₙ = n(a₁ + aₙ)/2. A geometric sequence multiplies by a fixed ratio r, so aₙ = a₁rⁿ⁻¹ and Sₙ = a₁(1 − rⁿ)/(1 − r); when |r| < 1 the sum to infinity is a₁/(1 − r). Fibonacci numbers start from F₀ = 0 and F₁ = 1, add the previous two, and are computed exactly to every digit.

Savings that grow by a fixed amount, compound growth and exam questions all use these formulas. The default, 3, 7, 11, …, reaches 39 at term 10, and those 10 terms sum to 210; the halving series 1 + 1/2 + 1/4 + … totals 1.998046875 after 10 terms and approaches 2.

A geometric series with |r| ≥ 1 has no finite sum to infinity, and an arithmetic series has one only when every term is 0. The Fibonacci sum F₁ + … + Fₙ equals Fₙ₊₂ − 1.

## Inputs

- **Sequence** (options: Arithmetic, Geometric, Fibonacci)
- **First term a₁**
- **Common difference d**
- **Common ratio r**
- **Term number n**: Fibonacci counts from F₀ = 0, F₁ = 1; the others from a₁.

## Results

- nth term — main result
- Sum of the first n terms
- Sum to infinity
- nth term, all digits
- Digits in the term

## Formula

$$
\begin{gathered} a_n = a_1 + (n-1)d \\ S_n = \tfrac{n}{2}(a_1 + a_n) \\[10pt] a_n = a_1 r^{n-1} \\ S_n = a_1\frac{1 - r^n}{1 - r},\quad S_\infty = \frac{a_1}{1 - r} \\[10pt] F_n = F_{n-1} + F_{n-2} \end{gathered}
$$

## Worked examples

### Arithmetic 3, 7, 11, … to 10 terms

- Sequence: Arithmetic
- First term a₁: 3
- Common difference d: 4
- Term number n: 10
- **nth term: 39**
- **Sum of the first n terms: 210**
- Checked against: Python 3.8: sum(3 + 4k for k in range(10)) = 210, last term 39

### Arithmetic with a negative step

- Sequence: Arithmetic
- First term a₁: 100
- Common difference d: -7.5
- Term number n: 20
- **nth term: -42.5**
- **Sum of the first n terms: 575**
- Checked against: Python 3.8 decimal loop over 20 terms (forkA/verify_seq.py)

### Geometric 2, 6, 18, … to 6 terms

- Sequence: Geometric
- First term a₁: 2
- Common ratio r: 3
- Term number n: 6
- **nth term: 486**
- **Sum of the first n terms: 728**
- Checked against: Python 3.8: 2·3⁵ = 486, Σ 2·3^k (k < 6) = 728

### Halving series 1 + 1/2 + 1/4 + …

- Sequence: Geometric
- First term a₁: 1
- Common ratio r: 0.5
- Term number n: 10
- **nth term: 0.001953125**
- **Sum of the first n terms: 1.998046875**
- **Sum to infinity: 2**
- Checked against: Python fractions: Σ (1/2)^k for k < 10 = 1023/512; sum to infinity 1/(1 − 1/2) = 2

### Ratio 1 (edge)

- Sequence: Geometric
- First term a₁: 5
- Common ratio r: 1
- Term number n: 4
- **nth term: 5**
- **Sum of the first n terms: 20**
- Checked against: With r = 1 every term is a₁, so Sₙ = n·a₁ = 20

### Fibonacci F₁₀₀

- Sequence: Fibonacci
- Term number n: 100
- **nth term: 3.54225 × 10²⁰**
- **nth term, all digits: 354224848179261915075**
- **Digits in the term: 21**
- **Sum of the first n terms: 9.27373 × 10²⁰**
- Checked against: OEIS A000045 (F₁₀₀); sum F₁₀₂ − 1 from a Python 3.8 loop

## Questions

### How do you find the nth term of an arithmetic sequence?

Use aₙ = a₁ + (n − 1)d: start from the first term and add the common difference n − 1 times. For 3, 7, 11, … the difference is 4, so the 10th term is 3 + 9 × 4 = 39 and the 50th is 3 + 49 × 4 = 199. To find d from two terms, divide their difference by the gap in positions: (39 − 3)/(10 − 1) = 4.

### What is the formula for the sum of an arithmetic series?

Sₙ = n(a₁ + aₙ)/2, the number of terms times the average of the first and last term. For 3 + 7 + … + 39, which has 10 terms, S = 10 × (3 + 39)/2 = 210. The pairing idea behind it is often credited to the young Gauss, who summed 1 to 100 as 50 pairs of 101 to get 5,050.

### How do you find the sum of a geometric series?

For n terms, Sₙ = a₁(1 − rⁿ)/(1 − r) whenever r ≠ 1. For 2 + 6 + 18 + … with 6 terms, S = 2 × (1 − 3⁶)/(1 − 3) = 2 × (−728)/(−2) = 728. When r = 1 every term equals a₁, so Sₙ = n × a₁ and 5 + 5 + 5 + 5 = 20.

### When does a geometric series have a sum to infinity?

Only when the common ratio is strictly between −1 and 1. Then rⁿ shrinks toward 0 and the sum approaches a₁/(1 − r): 1 + 1/2 + 1/4 + … = 1/(1 − 1/2) = 2, and 0.9 + 0.09 + 0.009 + … = 0.9/(1 − 0.1) = 1, which is why 0.999… equals 1. With |r| ≥ 1 the terms do not shrink, so the series grows without bound or oscillates.

### What is the 100th Fibonacci number?

F₁₀₀ = 354,224,848,179,261,915,075, a 21-digit number, counting from F₀ = 0 and F₁ = 1 as in OEIS A000045. Consecutive Fibonacci numbers grow by a factor approaching the golden ratio φ ≈ 1.618034, so Fₙ is close to φⁿ/√5 and each term adds about 0.209 digits.

### How accurate is the arithmetic, geometric and Fibonacci sequence calculator?

Accuracy depends on your inputs and the method's assumptions. Decimal arithmetic uses 50 significant digits, but estimates, numerical methods and source data can be less precise; the displayed rounding does not remove those limits. It is checked against 7 worked examples whose answers come from independent sources; for example, “Arithmetic 3, 7, 11, … to 10 terms” is checked against Python 3.8: sum(3 + 4k for k in range(10)) = 210, last term 39.

### Where does the method come from?

Abramowitz & Stegun, Handbook of Mathematical Functions, §3.6 (series); OEIS A000045 — Fibonacci numbers; Wikipedia — Geometric series.

## Sources

- Abramowitz & Stegun, Handbook of Mathematical Functions, §3.6 (series)
- [OEIS A000045 — Fibonacci numbers](https://oeis.org/A000045)
- [Wikipedia — Geometric series](https://en.wikipedia.org/wiki/Geometric_series)
