What the heck’s a turtle dove and who lit up that deer?
I don’t know what Christmas is, but Christmas time is here!
I don’t know what Christmas is, but Christmas time is here!
Or maybe it’s there… or it’s somewhere…
Old 97s, Guardians of the Galaxy 2022 Christmas Special

The Christmas before last we played a family trivia game in which one question was: how many gifts were received in the 12 days of Christmas?
The answer is 364 and my daughter, working with her husband (fiancé at the time), got there first.
364 gifts, one gift for each day in a non-leap year (365 days). Every day except Christmas, you could say.
I’m not good at coming up with answers to this sort of question quickly, but I enjoy thinking about the underlying problem, different approaches, and in particular, the simplest and most general solution. This kind of recreational mathematics also often takes me down unexpected paths.
I can never remember the lyrics, so here’s a reminder of The 12 days of Christmas, a carol in which each each day, gifts are given to the recipient by a true love. The following omits a few days (verses) for brevity:
On the first day of Christmas, my true love sent to me, a partridge in a pear tree.
On the second day of Christmas, my true love sent to me, 2 turtle doves and partridge in a pear tree.
On the third day of Christmas, my true love sent to me, 3 french hens, 2 turtle doves, and a partridge in a pear tree.
On the fourth day of Christmas, my true love sent to me, 4 calling birds, 3 french hens, 2 turtle doves, and a partridge in a pear tree.
On the fifth day of Christmas, my true love sent to me, 5 golden rings, 4 calling birds, 3 french hens, 2 turtle doves, and a partridge in a pear tree.
…
On the eleventh day of Christmas, my true love sent to me, 11 pipers piping, 10 lords a-leaping, 9 ladies dancing, 8 maids a-milking, 7 swans a-swimming, 6 geese a-laying, 5 golden rings, 4 calling birds, 3 french hens, 2 turtle doves, and a partridge in a pear tree.
On the twelfth day of Christmas, my true love sent to me, 12 drummers drumming, 11 pipers piping, 10 lords a-leaping, 9 ladies dancing, 8 maids a-milking, 7 swans a-swimming, 6 geese a-laying, 5 golden rings, 4 calling birds, 3 french hens, 2 turtle doves, and a partridge in a pear tree.
see Genius Lyrics for full lyrics
For the purpose of solving the problem, we can ignore the actual gifts and just focus on the numbers, e.g. the two turtle doves becomes just 2 gifts of some kind, in this case, 2 lots of the same kind of gift (turtle dove) on day 2, or simply 2 lots of gift number 2.
A first intuition leads to adding all the gift numbers from 1 to 12 giving 78, but that’s only part of the answer.
On the first day we are given 1 gift (a partridge in a pear tree).
On the second day we are given 1 gift plus 2 more (a partridge in a pear tree, two turtle doves) giving 1+2 = 3 gifts.
On the third day we are given 1 gift plus 2 more plus 3 more (a partridge in a pear tree, two turtle doves, three french hens) giving 1+2+3 = 6 gifts.
And so on.
Of course, the ordering in the carol’s verses is the reverse of 1+2+3+…+n, given the order in which the gifts appear, but since 1+2+3+…+n = n+…+3+2+1, the summation is unaffected.
Here’s the complete list:
- Day 1: 1
- Day 2: 1 + 2 = 3
- Day 3: 1 + 2 + 3 = 6
- Day 4: 1 + 2 + 3 + 4 = 10
- Day 5: 1 + 2 + 3 + 4 + 5 = 15
- Day 6: 1 + 2 + 3 + 4 + 5 + 6 = 21
- Day 7: 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28
- Day 8: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 = 36
- Day 9: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 45
- Day 10: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 55
- Day 11: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 = 66
- Day 12: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 = 78
Adding all the results in bold gives: 1 + 3 + 6 + 10 + 15 + 21 + 28 + 36 + 45 + 55 + 66 + 78 = 364.
When we were all trying to come up with the right number that Christmas time, I couldn’t help but wonder whether there were simpler ways to arrive at this, more compact expressions. It turns out there are.
What interests me is this: finding the most compact mathematical expression that gives the same answer as the brute force row addition method above, whether the n in “The n days of Christmas” is 12 or 100. Imagine the time and effort required if there were 100 days of Christmas!
The second post will explore two approaches, first very briefly revisiting the row addition approach above, then moving on to column multiplication and addition of these products. It’s much easier to see this working than explain it abstractly.
The third post will generalise the approaches so far to any value of n, not just 12, via simple code in different programming languages.
The fourth post will present an approach involving the day 1 to 12 (or 1 to n) results as triangular numbers and the sum of these. I arrived at this after listening to a podcast by chance that helped me think about the problem in a different way. This approach allows the generalisation to any value of n with a mathematical expression rather than via programming.
The fifth post will present the most compact general solution for any value of n that I have found so far, arrived at by plotting and modelling the results. There will also be a short digression on rational numbers vs real numbers and problems arising from the representation of real numbers in computers.
The sixth post will summarise the approaches and their relative performance.
The seventh and final post will show that a potentially interesting link exists between the last two approaches, by employing a bit of calculus.
All of this in a single post would be a bit much. Several short posts seemed more appropriate.
Stay tuned for part 2.


















