Arithmetic Sequence and Series

April 12, 2026

Problem

Visualize the sum 3+7+11+15+...+39 as stacking rectangles. Show Gauss's pairing trick.

Explanation

Arithmetic sequences and series

An arithmetic sequence has a constant difference dd between consecutive terms: a1,a1+d,a1+2d,a_1, a_1+d, a_1+2d, \ldots

nth term formula: an=a1+(n1)da_n = a_1 + (n-1)d

Sum of first nn terms: Sn=n(a1+an)2S_n = \frac{n(a_1 + a_n)}{2} = number of terms × average of first and last.

Step-by-step: Sum 3+7+11+15++393 + 7 + 11 + 15 + \cdots + 39

a1=3a_1 = 3, d=4d = 4. First find nn: 39=3+(n1)(4)39 = 3 + (n-1)(4)n=10n = 10.

S=10(3+39)2=10×422=210S = \frac{10(3 + 39)}{2} = \frac{10 \times 42}{2} = 210.

Gauss's trick: Pair first and last: 3+39=423 + 39 = 42, 7+35=427 + 35 = 42, ... 5 pairs × 42 = 210.

Try it in the visualization

Adjust a1a_1, dd, nn. The staircase bars show equal steps. Gauss's pairing animates — first+last, second+second-to-last, all summing to the same value. The sum of nn terms: Sn=n(a1+an)/2S_n = n(a_1 + a_n)/2. Gauss's trick: pair first and last terms — each pair sums to a1+ana_1 + a_n.

Interactive Visualization

Parameters

3.00
4.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
Arithmetic Sequence and Series | MathSpin