Wednesday, October 12, 2005

 

Friday XIII

Ever wonder whether there are years without any Friday XIII? How many there are in the *worst* years? If there are always the same number? Well, I did, and I set out to study all the possibilities with a spreadsheet. Once the spreadsheet was ...should I say built, specified, programmed, formulated? what does one do to make a spreadsheet one's need? Well, the spreadsheet was easily extended to consider the days of the week that recurring holidays fell, to compute the *good* years for holidays, the *lean* years for holidays, and, what really annoys me, the years holidays fall on Saturday! Why is it a problem that holidays fall on Saturday? Stores are closed on a day I normally am free to shop.

Back to the question of XIIIths: simply put, months occur in the same order every year, and other than February have the same number of days every year. Thus, there are only fourteen possible cases to consider, depending on the day the year starts, and how many days February has (leap year or not). For instance, January 13th will fall the fifth weekday after January 1, since the 15th (and 8th, 22nd, and 29th) fall on the same weekday as the 1st. If the year begins on Sunday, the 13th will fall on Friday; if the year begins any other weekday, January is *safe*!

In the same way, we can determine the offset for the 13th of each of the following months. January has 31 days, which is 3 more than 28 (i.e. modulo 7). Since Jan 13th falls the fifth weekday after the 1st, and the 13th of Feb will fall 31 days later, it will fall on the eighth weekday after the 1st, which is also the next weekday after the 1st. And so we go, accumulating modulo 7...

Offsets From January 1 to 13th of Each Month




-----Leap YearsNon-Leap Years
MonthDaysMod 7OffsetDaysMod 7Offset
Jan31353135
Feb29112801
Mar31323131
Apr30253024
May31303136
Jun30233022
Jul31353134
Aug31313130
Sep30243023
Oct31363135
Nov30223021
Dec31343133


With this table, we can now answer our questions. Better yet, we can derive another table! This one will tell us how many times each offset occurs in a year, leap or otherwise. Why does this interest us? Because every offset occurs at least once a year, so no matter what weekday the year starts, there will always be at least one Friday XIII. And there will be at most three, in non-leap years starting on Thursday: February, March, and November each have offset="1". Shall we check? Fridays are Jan 2, 9, 16, 23, 30, 37 (=Feb 6), Feb 13! And March 13, since February has 28 days in non-leap years. Trust me for November?

Number of Occurences of Offsets from Jan 1 to the 13th of a Month


OffsetIn Leap YearsIn Non-Leap Years
011
123
221
312
422
532
611

Offset "0" means the 13th falls the same day of the week as January 1; if the year started on Friday, the month with offset 0 will have a Friday XIII. Similarly, offset "6" means the sixth day after, or, equivalently, the day before; if the year began on Saturday, the month with offset 6 will have a Friday XIII.

This year, MMV for most Europeans, began on Saturday and is not a leap-year. It has one Friday XIII, in May.

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?