List all the numbers:
1, 2, 3, 4, 5, 6, 7, ...
skip every second one:
1, 3, 5, 7, ...
form the partial sums like this:
1, 1+3, 1+3+5, 1+3+5+7, ...
Hey, you get the square numbers!
1, 4, 9, 16, ...
Lots of people know that. But now list all the numbers
1, 2, 3, 4, 5, 6, 7, ...
skip every *third* one:
1, 2, 4, 5, 7, 8, 10, 11, ...
then form the partial sums:
1, 1+2, 1+2+4, 1+2+4+5, 1+2+4+5+7 ...
=
1, 3, 7, 12, 19, ...
then skip every *second* one:
1, 7, 19, ....
then form the partial sums again:
1, 8, 27, ...
Hey, now you get the cubes! You shouldn't trust me based on so little evidence, so do some more, or prove it works.
But the cool part is that this pattern goes on forever. If you list all the natural numbers starting from 1, skip every nth one, form the list of partial sums, skip every (n-1)st one, form the list of partial sums, skip every (n-2)nd one, ... blah di blah di blah... skip every 2nd one, then form the list of partial sums, you get the nth powers!
This is called Moessner's theorem, and I learned about it from Michael Fourman. It's in Chapter 7.5 here:
• Jan Rutten, The Method of Coalgebra: Exercises in Coinduction, https://ir.cwi.nl/pub/28550/rutten.pdf
Moral: anytime you see a pattern in mathematics - one that goes on infinitely, not a coincidence! - it's probably just the tip of a bigger iceberg.