Example — Sum of the first nn squares

P(n) ⁣:12+22++n2=n(n+1)(2n+1)6.P(n)\colon\quad 1^2+2^2+\cdots+n^2 = \frac{n(n+1)(2n+1)}{6}. Base: n=1n=1: 1=12361=\dfrac{1\cdot 2\cdot 3}{6}. True.

Step: we assume P(k)P(k) and add (k+1)2(k+1)^2: k(k+1)(2k+1)6+(k+1)2=(k+1)[k(2k+1)+6(k+1)]6=(k+1)(2k2+7k+6)6=(k+1)(k+2)(2k+3)6,\frac{k(k+1)(2k+1)}{6}+(k+1)^2 = \frac{(k+1)\bigl[k(2k+1)+6(k+1)\bigr]}{6} = \frac{(k+1)(2k^2+7k+6)}{6} = \frac{(k+1)(k+2)(2k+3)}{6}, which is P(k+1)P(k+1). ∎

Topics: Set theory
Concepts: Principle of induction
Methods: Induction
Skills: Proving