DEV Community

Cover image for The Beautiful Cube Series Identity That Looks Like Coincidence
Ganesh Kumar
Ganesh Kumar

Posted on

The Beautiful Cube Series Identity That Looks Like Coincidence

Hello, I'm Ganesh. I'm building git-lrc, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on Github. Star git-lrc on GitHub to help more developers discover the project. Do give it a try and share your feedback for improving the product.

A Math Identity That Feels Wrong

While playing with number series, I came across something that looked like a coincidence.
Let's start with:

√(1³ + 2³)
= √(1 + 8)
= √9
= 3
Enter fullscreen mode Exit fullscreen mode

Nothing special yet.

But notice:

3 = 1 + 2
Enter fullscreen mode Exit fullscreen mode

Interesting.

Let's add another cube.

√(1³ + 2³ + 3³)
= √(1 + 8 + 27)
= √36
= 6
Enter fullscreen mode Exit fullscreen mode

And:

6 = 1 + 2 + 3
Enter fullscreen mode Exit fullscreen mode

Now it starts looking suspicious.

Let's continue.

√(1³ + 2³ + 3³ + 4³)
= √100
= 10
Enter fullscreen mode Exit fullscreen mode

And:

10 = 1 + 2 + 3 + 4
Enter fullscreen mode Exit fullscreen mode

One more:

√(1³ + 2³ + 3³ + 4³ + 5³)
= √225
= 15
Enter fullscreen mode Exit fullscreen mode

Which is exactly:

15 = 1 + 2 + 3 + 4 + 5
Enter fullscreen mode Exit fullscreen mode

At this point most people assume it only works for small numbers.

Surprisingly, it works for every positive integer.

The Identity

The pattern can be written as:

√(1³ + 2³ + 3³ + ... + n³)
= 1 + 2 + 3 + ... + n
Enter fullscreen mode Exit fullscreen mode

Or equivalently:

1³ + 2³ + 3³ + ... + n³
=
(1 + 2 + 3 + ... + n)²
Enter fullscreen mode Exit fullscreen mode

This means the sum of the first n cubes is exactly equal to the square of the sum of the first n natural numbers.

Many people see this formula for the first time and immediately think:

There is no way that should be true.

Yet it is.

Testing With n = 10

Let's verify it.

Left side:

1³ + 2³ + 3³ + ... + 10³
= 3025
Enter fullscreen mode Exit fullscreen mode

Right side:

(1 + 2 + 3 + ... + 10)²

= 55²

= 3025
Enter fullscreen mode Exit fullscreen mode

Perfect match.

Why Mathematicians Love It

Most formulas involving powers become increasingly complicated.

For example:

1² + 2² + ... + n²
Enter fullscreen mode Exit fullscreen mode

requires a special formula.

1⁴ + 2⁴ + ... + n⁴
Enter fullscreen mode Exit fullscreen mode

requires an even more complicated formula.

But cubes are special.

They collapse into a perfect square:

1³ + 2³ + ... + n³
=
(1 + 2 + ... + n)²
Enter fullscreen mode Exit fullscreen mode

It is one of the most elegant identities in elementary mathematics.


The Closed Form

Since:

1 + 2 + 3 + ... + n
=
n(n + 1)/2
Enter fullscreen mode Exit fullscreen mode

we can rewrite the cube identity as:

1³ + 2³ + 3³ + ... + n³
=
[n(n + 1)/2]²
Enter fullscreen mode Exit fullscreen mode

This is commonly known as the Sum of Cubes Formula.

It is also associated with Nicomachus's Theorem, a result known for nearly two thousand years.

Final Thoughts

Mathematics is full of formulas, but only a few make you stop and check your calculator twice.

The cube series identity is one of them:

git-lrc

Any feedback or contributors are welcome! It’s online, source-available, and ready for anyone to use.

Star git-lrc on GitHub

Top comments (0)