taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.2.6-14

Exercise 1.2.6-14

proved in Lean solution written

RatingM21
MarkersM (mathematical)
KindK3, find a value: compute a number, a set or a closed form from the written solution
SectionSection 1.2.6 of Volume 1. Companion chapter: Binomial coefficients

The task

Find a closed form for ∑k=0nk4\sum_{k=0}^{n} k^4.

The exact wording is in your copy of the book.

Hints

Open one hint at a time. Try the exercise again after each.

Hint 1

Write k4k^4 as a combination of (k1),(k2),(k3),(k4)\binom{k}{1}, \binom{k}{2}, \binom{k}{3}, \binom{k}{4}.

Hint 2

Sum each term with eq. 1.2.6(11).

Solution

Show the solution

Step 1: expand k4k^4 in the falling powers of eq. 1.2.6(45): k4=k4‾+6k3‾+7k2‾+k1‾k^4 = k^{\underline{4}} + 6k^{\underline{3}} + 7k^{\underline{2}} + k^{\underline{1}}, where the Stirling numbers of the second kind in row 44 are 1,7,6,11, 7, 6, 1. Since kj‾=j!(kj)k^{\underline{j}} = j!\binom{k}{j}, k4=24(k4)+36(k3)+14(k2)+(k1).k^4 = 24\binom{k}{4} + 36\binom{k}{3} + 14\binom{k}{2} + \binom{k}{1}. (A check at k=2k = 2: 0+0+14+2=160 + 0 + 14 + 2 = 16.)

Step 2: sum with eq. 1.2.6(11), ∑k=0n(km)=(n+1m+1)\sum_{k=0}^{n}\binom{k}{m} = \binom{n+1}{m+1}: ∑k=0nk4=24(n+15)+36(n+14)+14(n+13)+(n+12).\sum_{k=0}^{n} k^4 = 24\binom{n+1}{5} + 36\binom{n+1}{4} + 14\binom{n+1}{3} + \binom{n+1}{2}.

Step 3: expand. With the falling products, 24(n+15)=15(n+1)n(n−1)(n−2)(n−3),36(n+14)=32(n+1)n(n−1)(n−2),24\binom{n+1}{5} = \tfrac{1}{5}(n+1)n(n-1)(n-2)(n-3),\quad 36\binom{n+1}{4} = \tfrac{3}{2}(n+1)n(n-1)(n-2), 14(n+13)=73(n+1)n(n−1),(n+12)=12(n+1)n.14\binom{n+1}{3} = \tfrac{7}{3}(n+1)n(n-1),\quad \binom{n+1}{2} = \tfrac{1}{2}(n+1)n. Take out the factor n(n+1)30\frac{n(n+1)}{30}: n(n+1)30[6(n−1)(n−2)(n−3)+45(n−1)(n−2)+70(n−1)+15].\frac{n(n+1)}{30}\bigl[6(n-1)(n-2)(n-3) + 45(n-1)(n-2) + 70(n-1) + 15\bigr]. Now 6(n3−6n2+11n−6)=6n3−36n2+66n−366(n^3 - 6n^2 + 11n - 6) = 6n^3 - 36n^2 + 66n - 36, 45(n2−3n+2)=45n2−135n+9045(n^2 - 3n + 2) = 45n^2 - 135n + 90 and 70(n−1)=70n−7070(n-1) = 70n - 70. The sum with 1515 is 6n3+9n2+n−16n^3 + 9n^2 + n - 1. And (2n+1)(3n2+3n−1)=6n3+6n2−2n+3n2+3n−1=6n3+9n2+n−1(2n+1)(3n^2 + 3n - 1) = 6n^3 + 6n^2 - 2n + 3n^2 + 3n - 1 = 6n^3 + 9n^2 + n - 1. So ∑k=0nk4=n(n+1)(2n+1)(3n2+3n−1)30.\sum_{k=0}^{n} k^4 = \frac{n(n+1)(2n+1)(3n^2+3n-1)}{30}.

Check

For n=3n = 3: 0+1+16+81=980 + 1 + 16 + 81 = 98, and the formula gives 3⋅4⋅7⋅35/30=2940/30=983 \cdot 4 \cdot 7 \cdot 35 / 30 = 2940/30 = 98. For n=5n = 5: the sum is 979979, and 5⋅6⋅11⋅89/30=29370/30=9795 \cdot 6 \cdot 11 \cdot 89 / 30 = 29370/30 = 979.

Remarks

The same method gives every sum of powers: row mm of the second Stirling triangle gives ∑km\sum k^m. See eq. 1.2.6(12) for m=2m = 2 and Section 1.2.11.2 for the general formula with Bernoulli numbers.

This solution is drafted, and a person has not reviewed it yet. The source.

In Lean

proved The statement and its proof are in Lean. The kernel accepts the proof, and it uses the standard axioms only.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.