… may sometimes be a bit tricky. Since we were kids, my mom crafted an Advent calendar each year, one for each of us. The base of the calendar was the same every year: a piece of fabric with laces made out of gift ribbon sewed on to it. The gift ribbon is then used to attach small packets to the calendar which she fills with little things and which carry a number for the day they are supposed to be opened.

When we were kids, my mom filled the packets with all kinds of things: a rubber for school, a cookie, some sweets, a coin of money and so on.

We still love the tradition getting this calendar, nowadays filled with self-made cookies and sometimes a lottery ticket of a charity organization. You never know, what she comes up with every year. Since I am married, I split the packets with my wife. The problem though is, that the calendar has an odd number of packets, starting on the 6th and ending on the 24th.

The 2020 edition of the calendar

So we decided, that one year I get the even numbered packets and she opens the odd ones and we take turns every year. Whenever my mom brings us a new calendar though, we can never remember how we split the packets last year. So the idea was to find an algorithm based on the year to decide who gets to start with opening the first packet and thus getting one more.

We started with the year of birth: great, both of us born in an odd year. Let’s take the month: we’re born in the same month. The day: doesn’t work either, both of us were born on an odd day. But I finally found a solution: we take the sum of the digits of the birthday (the day only is enough) and repeat that until a single digit remains. It’s an odd number for her and an even one for me. Problem solved!

Finding the right algorithm …