Little Bird and a Recursive Generator

Screen Shot 2017-07-01 at 3.26.21 PM.png

When I was asked to prove the following power summation formulas by mathematical induction:

\sum\limits_{i=1}^{n}i = 1+2+3+...+n=\frac{n (n+1)}{2},

\sum\limits_{i=1}^{n}i^2=1^2+2^2+3^2+...+n^2= \frac{n (n+1) (2n +1)}{6},

\sum\limits_{i=1}^{n}i^3=1^3+2^3+...+n^3 = \frac{n^2 (n+1)^2}{4},

I wondered how these closed forms are obtained in the first place!  Did a little bird whisper the formulas into our ears?

Even though there are elementary derivations of the power summation formulas, for example,  the visual derivations in Proof Without Words by MAA, none goes beyond the 3rd power.

In this blog, I will construct a recursive generator capable of generating the closed form of power summation


for all p \in N^{+}.

Let us start with a picture.


Fig. 1

Let A denotes the area of a rectangle, Fig.1 shows

\sum A_{blue} = A_{n^p \times n} - \sum A_{yellow}.


\sum A_{blue} = \sum\limits_{i=1}^{n}i^p,

A_{n^p\times n} = n^p n,

\sum A_{yellow}= \sum\limits_{i=1}^{n-1}i((i+1)^p-i^p),

we have

\sum\limits_{i=1}^{n}i^p = n^p n - \sum\limits_{i=1}^{n-1}i((i+1)^p-i^p).\quad\quad\quad(1)

when p = 1, (1) becomes

\sum \limits_{i=1}^{n}i=n^2-\sum\limits_{i=1}^{n-1}i((i+1)-i)

= n^2-(\sum\limits_{i=1}^{n}(i(i+1)-i)-(n(n+1)-n))

= n^2-\sum\limits_{i=1}^{n}i+n.





When p = 2,

\sum\limits_{i=1}^{n}i^2=n^2 n-\sum\limits_{i=1}^{n-1}i((i+1)^2-i^2)

= n^3-2\sum \limits_{i=1}^{n}i^2-\sum\limits_{i=1}^{n}i+2n^2+n.

Substituting (2) for \sum\limits_{i=1}^{n}i,  we have



\sum\limits_{i=1}^{n}i^2= \frac{n(n+1)(2n+1)}{6}.

In general, \forall p \in N^+,

\sum\limits_{i=1}^{n}i^p = n^p n-\sum\limits_{i=1}^{n-1}i((i+1)^p-i^p)

= n^{p+1}-(\sum\limits_{i=1}^{n}i((i+1)^p-i^p)-n((n+1)^p-n^p))

= n^{p+1}-     \sum\limits_{i=1}^{n}(i(\sum\limits_{j=0}^{p}\binom{p}{j}i^{p-j}-i^p))        +n((n+1)^p-n^p)


= n(n+1)^p - \sum\limits_{i=1}^{n}\sum\limits_{j=1}^{p}\binom{p}{j}i^{p-j+1}

= n(n+1)^p - \sum\limits_{i=1}^{n}(p i^p + \sum\limits_{j=2}^{p}\binom{p}{j}i^{p-j+1})

= n(n+1)^p - p\sum\limits_{i=1}^{n}i^p-\sum\limits_{i=1}^{n}\sum\limits_{j=2}^{p}\binom{p}{j}i^{p-j+1}

= n(n+1)^p-p\sum\limits_{i=1}^{n}i^p-\sum\limits_{j=2}^{p}\sum\limits_{i=1}^{n}\binom{p}{j}i^{p-j+1}

= n(n+1)^p-p\sum\limits_{i=1}^{n}i^p-\sum\limits_{j=2}^{p}(\binom{p}{j}\sum\limits_{i=1}^{n}i^{p-j+1}).

Solving for \sum\limits_{i=1}^{n}i^p, we obtain

\sum\limits_{i=1}^{n}i^p = \frac{n(n+1)^p -\sum\limits_{j=2}^{p}(\binom{p}{j}\sum\limits_{i=1}^{n}i^{p-j+1}) }{p+1}.


s_p \triangleq \sum\limits_{i=1}^{n}i^p,


s_p = \frac{n(n+1)^p - \sum\limits_{j=2}^{p}\binom{p}{j} s_{p-j+1}}{p+1}.\quad\quad\quad(3)

What we have here is a recursive generator capable of  generating  power summation formulas for virtually all integrer powers. Implemented in Omega CAS Explorer,  the figures below illustrate the awesomeness of this generator:

Screen Shot 2017-07-04 at 6.20.59 PM

Fig. 2

Screen Shot 2017-07-04 at 6.23.26 PM.png

Fig. 3

6 thoughts on “Little Bird and a Recursive Generator

  1. Pingback: “Chaplin or Leibniz ?” Revisit | Vroom

  2. Pingback: A Case of Pre-FTC Definite Integration | Vroom

  3. Pingback: Every dog has its day | Vroom

  4. Pingback: Pandora’s Box | Vroom

  5. Pingback: It’s Magic Square! | Vroom

  6. Pingback: In the spirit of Archimede’s method of exhaustion | Vroom

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s