Sum of a Finite Geometric Series

April 12, 2026

Problem

Find 1+2+4+8+...+512 = 2^10 − 1 = 1023.

Explanation

The finite geometric series formula

Sn=a1rn1r1(when r1)S_n = a_1 \cdot \frac{r^n - 1}{r - 1} \quad \text{(when } r \neq 1\text{)}

Step-by-step: Find 1+2+4+8++5121 + 2 + 4 + 8 + \cdots + 512

Step 1 — Identify a1a_1, rr, nn: a1=1a_1 = 1, r=2r = 2 (each term is double the previous), n=10n = 10 terms (from 20=12^0 = 1 to 29=5122^9 = 512).

Step 2 — Apply the formula:

S=1210121=102411=1023S = 1 \cdot \frac{2^{10} - 1}{2 - 1} = \frac{1024 - 1}{1} = 1023

Step 3 — Check by adding the first few: 1+2+4+8+16=311 + 2 + 4 + 8 + 16 = 31. Formula for 5 terms: (251)/(21)=31(2^5 - 1)/(2-1) = 31 ✓.

Why the formula works

Multiply both sides of S=a1+a1r+a1r2++a1rn1S = a_1 + a_1 r + a_1 r^2 + \cdots + a_1 r^{n-1} by rr:

rS=a1r+a1r2++a1rnrS = a_1 r + a_1 r^2 + \cdots + a_1 r^n

Subtract: SrS=a1a1rnS - rS = a_1 - a_1 r^n, so S(1r)=a1(1rn)S(1 - r) = a_1(1 - r^n), giving S=a1rn1r1S = a_1 \frac{r^n - 1}{r - 1}.

Neat observation

1+2+4++2n1=2n11 + 2 + 4 + \cdots + 2^{n-1} = 2^n - 1. In binary, this is 1111111\ldots1 (nn ones) = 2n12^n - 1. Each power of 2 is one binary digit!

Try it in the visualization

Adjust a1a_1, rr, nn. The doubling bars show how each term grows. The running sum approaches the formula's prediction.

Interactive Visualization

Parameters

1.00
2.00
10.00
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day