In the infinite series 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5... each positive integer k appears k times in consecutive order.
Write a formula for the sum of the first n terms of the series.
First off, the problem has a slight error. There are five 4's.
If n=k(k+1)/2 then the sum is k(k+1)(2k+1)/6
I derived this by noticing that the full blocks of equal numbers form a sort-of pyramid. I then derived the formula visually.
If n is not a trianglar number you'd just need a correction factor involving some sort of floor function to add in the extra rectangular bit.
Posted by Jer
on 2007-05-14 15:36:15