Skip to content

Closed forms for sums of integers and their squares

Question

Express 1+2+⋯+n1+2+\cdots+n and 12+22+⋯+n21^2+2^2+\cdots+n^2 as closed-form functions of nn.

Short answer

n(n+1)2\tfrac{n(n+1)}{2} and n(n+1)(2n+1)6\tfrac{n(n+1)(2n+1)}{6}. The first follows by pairing kk with n+1−kn+1-k. For the second, telescope (k+1)3−k3=3k2+3k+1(k+1)^3-k^3=3k^2+3k+1 over k=1,…,nk=1,\dots,n and solve for ∑k2\sum k^2 (or verify by induction).

Adapted from Crack, Heard on the Street, Q1.45, p.18; question and answer rewritten by SelfMadeQuant.com.

See the hint and the full worked solution in the question bank (free account).

Open the worked solution

Lessons behind this question