For the Record

https://commons.wikimedia.org/wiki/File:XRF_12days.jpg
Image: Wikimedia Commons

In December 2001, mathematician Bill Richardson received a call from a television producer asking for a formula that would reveal the total number of gifts given for any specified day in the song “The Twelve Days of Christmas.” He worked out that the total number of presents given on each day is a triangular number:

1
1 + 2
1 + 2 + 3
1 + 2 + 3 + 4

And so the cumulative total is the sum of triangular numbers:

1
1 + 3
1 + 3 + 6
1 + 3 + 6 + 10

So if Pn is the total number of presents given in the first n days, then

\displaystyle P_{n}=\sum_{i=1}^{n}\frac{1}{2}i(i + 1),

which works out to

\displaystyle \frac{n(n+1)(n+2)}{6},

“which is an elegant result,” Richardson writes. “So, the lucky girl received 1/6 × 12 × 13 × 14 = 364 presents in total. She should have had a very happy Christmas!”

(Bill Richardson, “The Twelve Days of Christmas,” Mathematical Gazette 86:507 [November 2002], 468.)