*“On the first day of Christmas my true love sent to me*

*A partridge in a pear tree…”*

I was out shopping the other day – geese and gold rings echoing on the speakers – and got wondering how many gifts the song names in total. At heart, it’s a mathematical pattern, so on the walk back I thought: maybe it has some interesting quirks behind it?

We all know the basic structure of the song: each verse adds a gift, one more then the last, then adds all the previous gifts into the bundle. So we end up with the following sum:

To make it easier to tally up, we can write this out as a table, with the first column giving the day, the second giving the total gifts that day, and the third giving the total gifts so far:

All this adding up of rows felt like something I’d seen before at school…

Ah yes, of course. It’s the values we get if we read down diagonally from ‘Pascal’s triangle’. Popularised by Blaise Pascal1, each entry in the triangle is the sum of the two numbers above. It also looks a bit like a mathsy Christmas tree2:

Pascal’s triangle is useful in maths because it summarises the number of ways you can choose **x** items from **n** total objects (e.g. the 2^{nd} entry inside the 4^{th} row – excluding the external canopy of 1s – is the number of possible ways to choose 2 objects from a collection of 4, i.e. 6 ways).

If we look at the values above table, we’ll notice it comes from the third diagonal of Pascal’s triangle. So to work out the total number of presents, we just need to count down twelve entries on this diagonal to get the answer: 364.

But is there a neater way to do this than drawing out the whole triangle?

According to the definition Pascal’s triangle, the 3^{rd} entry inside the 14^{th} row is the number of different ways there are to pick 3 objects out of a collection of 14. As far back as 6^{th} century India, mathematicians had derived the following formula for choosing **x** objects from a total of **n** possible objects:

So in our case, once we write out the factorial term, we have:

Some of the terms appear on both the top and the bottom, so we can cancel them out to leave us with:

As it happened, the question then cropped up in a Christmas pub quiz I attended a few days later. Which shows that it can sometimes be useful to indulge your gift-based curiosity…

And on that note, I hope you’re all having a good festival season.

Like many mathematical ideas, it was actually pioneered by the Persians rather than the Europeans.

Pascal took trees – and life – quite seriously. He once said: ‘Man’s greatness comes from knowing that he is wretched: a tree does not know it is wretched.’

Thanks. That was an enjoyable half hour or so reading and writing it out. Happy Christmas.