On this page
You know 1 + 2 + … + n = n(n + 1)/2, and n(n + 1)(2n + 1)/6 for the squares. For every power k, the sum of the first n k-th powers is a polynomial in n, and one family of fractions, the Bernoulli numbers, supplies every coefficient.
Why is 1ᵏ + 2ᵏ + … + nᵏ always a polynomial in n?
Faulhaber's formula expresses the sum of the p-th powers of the first n positive integers as a polynomial of degree p + 1 in n.
The reason is a telescoping sum. Write S_k(n) = 1ᵏ + … + nᵏ. Adding (m + 1)ᵏ⁺¹ − mᵏ⁺¹ for m = 1 to n leaves only (n + 1)ᵏ⁺¹ − 1. Expand each bracket by the binomial theorem: the top piece is (k + 1)mᵏ, the rest are lower powers. So (k + 1)·S_k(n) is (n + 1)ᵏ⁺¹ − 1 minus lower sums S_{k−1}, …, S_0. If those are polynomials, so is S_k, with leading term nᵏ⁺¹/(k + 1). Induction from S_0 = n does the rest. For k = 1: (n + 1)² − 1 = 2S_1 + n, so S_1 = (n² + n)/2.
Johann Faulhaber gave formulas up to the 17th power in his 1631 book Academia Algebrae, according to the Wikipedia article on Bernoulli numbers. Donald Knuth's 1993 paper Johann Faulhaber and sums of powers notes that Faulhaber's publications already state that for odd powers the sum is a polynomial in n(n + 1), as in the cubes, [n(n + 1)/2]².
Where do the Bernoulli numbers 1, −1/2, 1/6, 0, −1/30 come from?
The Bernoulli numbers Bₘ are the coefficients in the expansion x/(eˣ − 1) = B₀ + B₁x + B₂x²/2! + B₃x³/3! + …, as defined in the Wikipedia article on Bernoulli numbers.
The same source lists B₀ = 1, B₁ = −1/2, B₂ = 1/6, B₃ = 0, B₄ = −1/30, B₆ = 1/42 and B₈ = −1/30; every odd Bₙ after B₁ is zero. Some books use B₁ = +1/2.
To get them by hand, multiply both sides by (eˣ − 1)/x and compare coefficients. For every m ≥ 1, the sum of C(m + 1, j)·Bⱼ for j = 0 to m is 0.
m = 1: B₀ + 2B₁ = 0, so B₁ = −1/2.
m = 2: 1 + 3(−1/2) + 3B₂ = 0, so B₂ = 1/6.
m = 3: 1 − 2 + 1 + 4B₃ = 0, so B₃ = 0.
m = 4: 1 − 5/2 + 10/6 + 0 + 5B₄ = 0, so B₄ = −1/30.
Jacob Bernoulli's result was published posthumously in Ars Conjectandi in 1713; the same Wikipedia article notes Seki Takakazu's independent discovery, published posthumously in 1712.
How does Faulhaber's formula work for k = 2 and k = 3?
With B₁ = −1/2 the formula is cleanest for the sum up to n − 1; then add nᵏ:
0ᵏ + 1ᵏ + … + (n − 1)ᵏ = (1/(k + 1)) × [sum over j = 0 to k of C(k + 1, j)·Bⱼ·nᵏ⁺¹⁻ʲ]
Squares, k = 2. The bracket is n³ + 3(−1/2)n² + 3(1/6)n. Divide by 3: n³/3 − n²/2 + n/6. Add n²: n³/3 + n²/2 + n/6, which factors as n(n + 1)(2n + 1)/6. Check n = 4: 1 + 4 + 9 + 16 = 30, and 64/3 + 8 + 2/3 = 30.
Cubes, k = 3. The bracket is n⁴ + 4(−1/2)n³ + 6(1/6)n² + 4(0)n. Divide by 4: n⁴/4 − n³/2 + n²/4. Add n³: n⁴/4 + n³/2 + n²/4 = [n(n + 1)/2]². Check n = 4: 1 + 8 + 27 + 64 = 100 = 10².
Your turn, k = 4. You should get n⁵/5 + n⁴/2 + n³/3 − n/30, which gives 17 at n = 2.
What did Ada Lovelace's 1843 program compute?
In 1843 Ada Lovelace published a translation of Luigi Menabrea's article on Charles Babbage's Analytical Engine, with her own extensive notes; the Computer History Museum says they included the first published description of a stepwise sequence of operations for solving certain mathematical problems.
The last, Note G, is an algorithm for calculating Bernoulli numbers on the Analytical Engine. Its target was the eighth Bernoulli number, −1/30, which she labelled B₇. As printed, two variables in one division are swapped, and it is disputed whether Lovelace or Babbage developed the algorithm.
How do you use this in JEE problems?
Squares and cubes hide inside sums like Σ r(r + 1)(r + 2). Expand into powers of r, sum each with S_1, S_2, S_3, then run the n = 1, 2 check. Practise on these JEE Advanced paragraph questions on sequences and series. The Bernoulli numbers return in the Euler–Maclaurin formula, which turns sums into integrals, and in Euler's solution of the Basel problem.
If the generating function is where you stall, the Fermi Concept Library gives each concept in mathematics its own lesson. For practice, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.



