Sum of Powers Calculator

Calculate \(1^k+2^k+3^k+\cdots+n^k\) with formulas, exact results, and step-by-step explanations.

The upper limit of the sum. Enter a positive integer.
Use 0 or any positive integer. For \(k>4\), terms are calculated directly.

What Is a Sum of Powers?

A sum of powers adds consecutive positive integers after raising each integer to the same exponent. In sigma notation, the general form is:

$$ S_k(n) = \sum_{i=1}^{n}i^k = 1^k+2^k+3^k+\cdots+n^k $$

The value of \(k\) determines the type of powers being added. For example, \(k=1\) produces the sum of integers, \(k=2\) produces the sum of squares, and \(k=3\) produces the sum of cubes.

This calculator provides direct formulas for the first several powers and calculates higher powers term by term.

Sum of Powers Formulas

Power \(k=0\)

Sum of Zeroth Powers

$$ \sum_{i=1}^{n}i^0=n $$

Every non-zero number raised to the zeroth power equals 1, so there are \(n\) terms whose total is \(n\).

Power \(k=1\)

Sum of First Powers

$$ \sum_{i=1}^{n}i = \frac{n(n+1)}{2} $$

This is the familiar formula for the sum of the first \(n\) positive integers.

Power \(k=2\)

Sum of Squares

$$ \sum_{i=1}^{n}i^2 = \frac{n(n+1)(2n+1)}{6} $$

The formula gives the sum \(1^2+2^2+\cdots+n^2\).

Power \(k=3\)

Sum of Cubes

$$ \sum_{i=1}^{n}i^3 = \left( \frac{n(n+1)}{2} \right)^2 $$

The sum of the first \(n\) cubes is the square of the sum of the first \(n\) positive integers.

Power \(k=4\)

Sum of Fourth Powers

$$ \sum_{i=1}^{n}i^4 = \frac{ n(n+1)(2n+1)(3n^2+3n-1) }{30} $$

This formula calculates the sum \(1^4+2^4+\cdots+n^4\).

Examples of Sums of Powers

Example 1: \(k=1\)

$$ 1+2+3+4+5=15 $$

Using the formula: \[ \frac{5(6)}{2}=15. \]

Example 2: \(k=2\)

$$ 1^2+2^2+3^2+4^2+5^2 = 55 $$

Using the square-sum formula gives \(55\).

Example 3: \(k=3\)

$$ 1^3+2^3+3^3+4^3+5^3 = 225 $$

This also equals: \[ (1+2+3+4+5)^2=15^2=225. \]

Sum of Powers and Sigma Notation

The Greek letter sigma, \(\Sigma\), is commonly used to represent a summation. Instead of writing every term separately, we can write:

$$ \sum_{i=1}^{n}i^k $$

The lower limit \(i=1\) tells us where the summation starts, while \(n\) is the upper limit. The exponent \(k\) specifies the power applied to each integer.

For example:

$$ \sum_{i=1}^{5}i^3 = 1^3+2^3+3^3+4^3+5^3 = 225 $$

Higher Powers and Faulhaber's Formula

For every fixed non-negative integer \(k\), the sum \[ 1^k+2^k+\cdots+n^k \] can be expressed as a polynomial in \(n\). These formulas are commonly associated with Faulhaber's formula.

$$ \sum_{i=1}^{n}i^k $$

The polynomial becomes more complicated as \(k\) increases. For this reason, the calculator uses the well-known closed forms for powers 0 through 4 and performs direct exact summation for higher powers.

For large values of \(n\) and higher powers, direct calculation can require substantially more computation than a closed-form formula.

How to Use the Sum of Powers Calculator

  1. Enter the upper limit \(n\), such as \(10\).
  2. Enter the exponent \(k\), such as \(2\) or \(3\).
  3. Click Calculate Sum of Powers.
  4. The calculator displays the mathematical expression and exact result.
  5. For supported low powers, the page also shows the formula and calculation steps.

For example, entering \(n=10\) and \(k=2\) calculates: \[ 1^2+2^2+\cdots+10^2=385. \]

Related Summation & Series Calculators

Sum of Powers FAQ

What is the sum of powers formula?

The general sum of powers is written as \[ \sum_{i=1}^{n}i^k. \] For each fixed non-negative integer \(k\), this sum can be represented by a polynomial in \(n\).

What is the formula for \(1+2+\cdots+n\)?

The formula is \[ \frac{n(n+1)}{2}. \] It is the sum of the first \(n\) positive integers.

What is the formula for the sum of squares?

The sum of the first \(n\) squares is \[ \sum_{i=1}^{n}i^2 = \frac{n(n+1)(2n+1)}{6}. \]

What is the formula for the sum of cubes?

The sum of the first \(n\) cubes is \[ \sum_{i=1}^{n}i^3 = \left( \frac{n(n+1)}{2} \right)^2. \]

What is the sum of fourth powers?

The sum of the first \(n\) fourth powers is \[ \sum_{i=1}^{n}i^4 = \frac{ n(n+1)(2n+1)(3n^2+3n-1) }{30}. \]

What does \(k\) represent in a sum of powers?

The variable \(k\) is the exponent applied to each integer. For example, \(k=2\) means squares, while \(k=3\) means cubes.

Can this calculator calculate powers greater than 4?

Yes. For \(k>4\), the calculator evaluates the terms \(1^k,2^k,\ldots,n^k\) directly and adds them using exact integer arithmetic when BCMath is available.