Maths WorkshopMaths problems with full solutions
Exercise 337Logic, sets and proofs › Proof techniques › InductionHigh schoolAdded 31 Oct 2026

Sum of squares by induction

#induction#sums

Statement

Prove that for every integer n≥1n\ge1,
12+22+⋯+n2=n(n+1)(2n+1)6.1^2+2^2+\cdots+n^2=\frac{n(n+1)(2n+1)}{6}.

Hint

Prove it for n=1n=1, then show that if it holds for nn it holds for n+1n+1.

Show solutionHide solution

Solution

Base case. For n=1n=1, the left side is 11 and the right side is 1⋅2⋅36=1\frac{1\cdot2\cdot3}{6}=1.

Induction step. Assume the formula holds for some n≥1n\ge1. Then
∑k=1n+1k2=n(n+1)(2n+1)6+(n+1)2=(n+1)[n(2n+1)+6(n+1)]6.\sum_{k=1}^{n+1}k^2=\frac{n(n+1)(2n+1)}{6}+(n+1)^2=\frac{(n+1)\left[n(2n+1)+6(n+1)\right]}{6}.
Since n(2n+1)+6(n+1)=2n2+7n+6=(n+2)(2n+3)n(2n+1)+6(n+1)=2n^2+7n+6=(n+2)(2n+3), this equals (n+1)(n+2)(2n+3)6\dfrac{(n+1)(n+2)(2n+3)}{6}, which is the formula for n+1n+1.

By induction, the formula holds for all n≥1n\ge1.