What would be the sum of all the numbers (including repeats, of course) in the song?

Then, suppose you have some arbitrary number n bottles, which you would like to sing about. Find a formula in terms of n for the sum of all the numbers you will be singing.