Deriving the Formula for the Sum of the First n Integers Raised to a Power
2025-08-03
The problem we are addressing is how to derive the formula for the sum of the first n integers raised to an arbitrary but fixed power, specifically:
S(n) = 1^k + 2^k + 3^k + ... + n^k
Faulhaber's Formula
This formula is known as Faulhaber's formula, which expresses the sum of powers in a polynomial form. You can read more about it here.
Elementary Derivation
We can derive this formula using elementary math techniques, specifically leveraging telescoping sums and linear equations of partial sums.
Using Telescoping Sums
Consider the sum of powers:
∑i=1n (ik + 1 - (i - 1)k + 1) = nk + 1
When we expand (i - 1)k + 1 using the binomial theorem, we find that the highest term is ik + 1. Thus, the polynomial in i on the left-hand side has degree k.
This equation can be rearranged, allowing us to express the sum of ik we are looking for, provided we have the formulas for sums of powers up to k - 1 already.
For further details on this approach, visit here.
Direct Approach Using Linear Equations
Another method involves expressing the sum S(n) = 1k + 2k + ... + nk as a polynomial:
S(n) = ck + 1 * nk + 1 + ck * nk + ... + c1 * n + c0
Here, we can show that ck + 1 = 1 / (k + 1) and c0 = 0. The coefficients for the other terms can be found by solving a system of linear equations based on the first partial sums.
Example for k=3
To find the coefficients for k=3, we compute:
- S(1) = 13 = 1
- S(2) = 13 + 23 = 9
- S(3) = 13 + 23 + 33 = 36
Forming Linear Equations
Now we set up the equations:
c4 * 14 + c3 * 13 + c2 * 12 + c1 * 1 + c0 = 1 c4 * 24 + c3 * 23 + c2 * 22 + c1 * 2 + c0 = 9 c4 * 34 + c3 * 33 + c2 * 32 + c1 * 3 + c0 = 36
We already know c4 = 1/4 and c0 = 0. By simplifying these equations further, we can solve for the coefficients c3, c2, c1.
Conclusion
Using telescoping sums and solving linear equations, we can derive the formula for the sum of the first n integers raised to any power k. For more detailed steps and examples, see these references: Brilliant, Mathematics Stack Exchange, and Nick Schot on Medium.
Permanent Link for Post
Deriving the Sum of Powers Formula (2025-08-03)
Older Posts
- Scheduling Color Temperature Changes for Your Monitors (2025-06-07)
- Stream and Play: Emulating Retro Games on Chromecast with Google TV (2025-05-10)
- Simulating the Monty Hall Problem (2025-05-04)
- Pi-hole on Raspberry Pi OS with dnscrypt-proxy (2024-01-28)
- Prime or Not Prime: That is the Question (2023-07-22)
- Switching Monitor Inputs on Computer Wakeup (2021-04-25)
- Changing the Playback Speed on Spotify's Web Player (2021-04-24)
- Solving Microcorruption Hollywood (2021-03-28)
- Font Rendering on macOS (2020-07-02)
- Video Disk Recorder (VDR) Tooling (2020-05-30)
- Spotify Web Player Failure due to Crash of Connected Device (2020-05-08)
- Malicious Forward Proxies (2020-04-27)
- Switching to a Dark Theme (2020-04-25)
- USB 3.0 to Gigabit Ethernet Adapter with Realtek 8153 Chipset on macOS Catalina (2020-04-23)
- Backing up Emails using OfflineIMAP (2020-04-19)
- Using a Raspberry Pi as a Wireless Access Point (2020-04-18)
- Accessing External Hard Drives in a Virtual Machine (2017-12-11)
- Managing Clipboards (2016-11-23)
- Multi-Screen Configuration Using Xrandr (2016-07-02)
- Email Backup and Migration using Thunderbird (2016-06-29)
- Automatic SSH Proxy Selection (2016-02-08)
- Set Color Temperature (2015-11-25)
- Completion Methods in Vim (2015-10-10)
- Fuzzing the mbed TLS Library (2015-09-26)
- SSH Weak Diffie-Hellman Group Identification Tool (2015-08-12)
- Building a Standing Desk for 50 Bucks (2015-01-25)
- High-DPI Displays under Linux (2014-12-23)
- Slow Wi-Fi on the Raspberry Pi (2014-06-15)
- XBMC on the Raspberry Pi (2014-06-14)
- Turning the Raspberry Pi into a Game Console (2014-06-12)
- ZFS Backups to External Hard Drives (2014-03-23)
- Display the I/O Usage of a Process (2014-02-21)
- Determining Wireless Network Channel Usage (2014-02-09)
- Managing Web Files through a Repository (2013-08-17)
- Simple HTTP File Servers (2013-08-16)
- Protect your SSH Private Keys (2013-06-16)
- Forward Secrecy for HTTPS and Ephemeral Diffie-Hellman (2013-06-14)
- Markdown Preview Chrome Extension (2013-06-13)