letx=

Sequences and series

Sum of the first n squares

Adds 12+22+⋯+n2 in one step; it is always a whole number even though there is a division by 6.

12+22+⋯+n2=n(n+1)(2n+1)6
Sigma notation∑k=1nk2=n(n+1)(2n+1)6

Calculator

The live calculator needs JavaScript. The worked example below shows the same steps it would.

See it move

0123456789101150100150200250300350400
  • Bars: 1², 2², …, 10². Line: the running total, reaching 385 = 10·11·21/6.

What the symbols mean

S
the sum 12+22+⋯+n2
n
the last number squared

When to use it

Use it to count squares of every size on a grid (an 8 × 8 chessboard has 12+⋯+82=204 squares), to count cannonballs in a square pyramid, and when estimating areas under y=x2 with rectangles, which is where integration starts.

Worked example

Find 1² + 2² + … + 10² (n = 10).

  1. Start from the formula.

    S=n⁢(n+1)·(2⁢n+1)6
  2. Substitute n = 10 and work it out.

    S=10·(10+1)·(2·10+1)6
    =10·11·(20+1)6
    =110·216
    =23106
    =385

Answer S = 385

Why it works

It can be proved by induction: assume it for n, add (n+1)2, and the right side factorises into the same formula with n+1. One of n, n+1 is even and one of n, n+1, 2n+1 is a multiple of 3, which is why the division by 6 always comes out exactly.

Common mistakes

  • Squaring the sum instead: (1+2+⋯+10)2=3025, not 385.
  • Writing 2n instead of 2n+1 in the last bracket.