Continued fraction day

Why do we have February 29 this year, and not in other years? Of course it’s because the ratio between the Earth’s orbital period and its rotational period is not an integer, but rather is about 365.242199. Let’s call this 365+α. And this is approximated well by the rational number 365{1 \over 4}, the first convergent of the continued fraction. The convergents of continued fractions give, in a sense, the “best possible” rational approximations to irrational numbers.

Yury Grabovsky observes that the next few convergents to α are 7/29, 8/33, 31/128, 163/673, and indeed the Iranian calendar uses 8 leap years in 33. This is a bit harder to compute in one’s head. 31/128 would be pretty easy to work with — a year is a leap year if it’s divisible by 4, except not if it’s divisible by 128.

(Implicit in the Gregorian calendar rules — no leap years in years divisible by 100, except if they’re divisible by 400 — is the rational approximation 97/400, but that’s not a convergent.)

Therefore I nominate February 29 (in years when it occurs) as a new holiday, to be observed by the consumption and/or use of things that rely on rational approximations to irrational numbers.

What are these, you ask?

1. go look at the moon. The Metonic cycle is a period of 19 years, which is very nearly 235 (synodic) lunar months. So the full moon, for example, falls on (approximately) the same day on the solar calendar in the year N and in the year N + 19. The Hebrew calendar has seven leap years in nineteen, where the leap years have 13 (lunar) months instead of twelve. The Islamic calendar has twelve lunar months in each year, with the result that they fall backwards 235-12 \times 19 = 7 lunar months in nineteen lunar years. Oh, and on February 29, 1936 the phase of the moon was the same as it is today.

2. play some music. Western music theory is based on the existence of the circle of fifths, which in turn is based on the fact that $(3/2)12 \approx 2^7$ — that is, twelve perfect fifths is very nearly seven octaves. Taking logs this becomes $\log_2 3 \approx 19/12$. The fact that this is not the best approximation ever — it’s off by $0.0016$ — as well as the desire to incorporate other consonances into musical tuning caused lots of trouble.

3. use a computer. In computer world we use the prefix “kilo-” to stand for 1024 or 210, while everywhere else we use “kilo-” to stand for 1000 or 103. This abuse of language is only possible because log_10 2 \approx 3/10.

4. it might be your birthday, in which case I am sad for you because your birthday comes but once every four years! But 253/365 is a convergent to \log 2 (that’s a natural log) and so e^{-253/365} is very near $1/2$ (to be precise, it’s 0.499998248 or so). And why would you care about such a thing? Well, let’s assume that nobody’s born on February 29, and all other birthdays are equally likely. Now take twenty-three people at random; the probability that their birthdays are all different is

{365 \over 365} \times {364 \over 365} \times \cdots \times {343 \over 365} = \left( 1 - {1 \over 365} \right) \left( 1 - {2 \over 365} \right) \cdots \left( 1 - {22 \over 365} \right).

But if you remember that 1-z \approx e^{-z} when z is small then this is approximately

\exp \left( - {1+2+\cdots+22 \over 365} \right) = \exp \left( -{253 \over 365}\right).

And the answer to the famous “birthday problem” — how many people do you have to have for there to be a fifty percent chance that two of them have the same birthday — is twenty-three.

(I honestly hadn’t seen this one until I was preparing for this week’s classes. It just so happens that the right day to introduce the birthday problem in one of my classes this semester is February 29… also, R has a command for this.)

5. if it’s your birthday, you should eat cake. If it’s not, you should eat pie. Of course the most famous rational approximation of them all is \pi \approx 22/7. It’s a shame that February 29 is so close to pi day. Perhaps this is another argument for switching to tau day. Tau day is on June 28, so you have to wait a bit. But you get to eat two pies.

(It appears I’m not the first person to mention continued fractions on February 29. Mark Dominus did it in 2008, and I linked to it. Also, here’s an online continued fraction calculator. James Grime beat me to the punch, posting this Numberphile video with astronomer Meghan Gray; he posted while it was still February 28, despite being eight time zones ahead of me.

2 thoughts on “Continued fraction day

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s