Friday the 13th
This post was originally published on November 13, 2006 (which wasn’t actually a Friday). It has been edited for style and content.
The date made me wonder why a Friday the 13th earns special mention any time an event comes up on that day. Consider that there are twelve months in a year, and each one has a 13th which must fall on one of seven weekdays — there are more months than days of the week, so it’s entirely plausible that more than one of them could be Fridays.
Case in Point
If February 13th is a Friday on a common year, then March 13th would also be a Friday, falling exactly four weeks later. This proves that it’s entirely possible to have two in one year (two-in-a-row, even), but makes me wonder what the upper limit is.
Explanation
Assign each day of the week a numerical value, i.e. 0 = Sunday .. 6 = Saturday. Using this map, we can determine the day of the week that each 13th will fall on, given d, the day of the week for January 1st, and p, which equals 0 on a common year, and 1 on a leap year.
| January 13th | d + 12 (mod 7) | |
| February 13th | d + 43 (mod 7) | |
| March 13th | d + 71 + p (mod 7) | |
| April 13th | d + 102 + p (mod 7) | |
| May 13th | d + 132 + p (mod 7) | |
| June 13th | d + 163 + p (mod 7) | |
| July 13th | d + 193 + p (mod 7) | |
| August 13th | d + 224 + p (mod 7) | |
| September 13th | d + 255 + p (mod 7) | |
| October 13th | d + 285 + p (mod 7) | |
| November 13th | d + 316 + p (mod 7) | |
| December 13th | d + 346 + p (mod 7) |
The numerical offsets above represent the number of days after January 1st that the thirteenth of each month occurs. If we apply modulo 7 to these offsets, this will give us the day-of-the-week offset from our starting day, d:
| common year | { 5, 1, 1, 4, 6, 2, 4, 0, 3, 5, 1, 3 } |
| leap year | { 5, 1, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4 } |
In other words, in a common year in which January 1st is a Monday (1), then January 13th will be Saturday (1 + 5 = 6), February 13th will be a Tuesday (1 + 1 = 2), etc.
Conclusion
To answer the original question, it’s obvious that the most frequent day-of-the-week offset is 1 on a common year and 5 on a leap year, both of which occur thrice. Therefore it is possible to have up to three Friday the 13ths in one year.
So what’s the next year we’ll have three? If 1 is the most common offset, we want to take 5 (Friday) - 1 = 4 (Thursday) and find the next common year that starts on Thursday, or similarly take 5 (Friday) - 5 = 0 (Sunday) and find the next leap year that starts on Sunday. These turn out to be 2009 (February 13th, March 13th, November 13th) and 2012 (January 13th, April 13th, July 13th).