本文通过数学分析解释了为什么13号更常落在星期五,而不是其他星期几。文章使用数论和格里高利历法的特性,计算了400年周期内13号落在各星期几的频率,证明星期五出现的次数最多。
Why Friday the 13th is a mathematical inevitability
No bad luck here—just lots of fascinating math that explains why the 13th of a month so often falls on a Friday
Many people shudder at the thought of Friday the 13th. Myths, legends and horror films have turned it into an omen of bad luck.
History has also had plenty of bad Friday the 13ths. On Friday, September 13, 1940, Nazi forces bombed Buckingham Palace in London. On Friday, January 13, 2012, the Italian cruise ship Costa Concordia struck a rocky outcropping and capsized, resulting in a total evacuation and 32 deaths. And on Friday, September 13, 1996, Tupac Shakur succumbed to his gunshot wounds from six days prior.
But the 13th day of a month that happens to fall on a Friday is just a day. Superstitions about it can be dispelled with mathematics. Using number theory, you can easily demonstrate that there isn’t a single year without this ominous date. In fact, the 13th day of a month falls on a Friday more often than on any other day of the week.
To keep things simple, let’s first focus on years with 365 days. We can begin by calculating which sequentially counted day of the year the 13th of a month will fall on using the number of days in each month as a guide. So January 13 is the 13th day of the year, February 13 is the 44th day, March 13 is the 72nd day, and so on. Here’s a table summarizing what this approach reveals.
During a year with 365 days, January 13 falls on the 13th day of the year. February 13 falls on the 44th day of the year; March 13 falls on the 72nd day; April 13 falls on the 103rd day; May 13 falls on the 133rd day; June 13 falls on the 164th day; July 13 falls on the 194th day; August 13 falls on the 225thday; September 13 falls on the 256thday; October 13 falls on the 286th day; November 13 falls on the 317th day; and December 13 falls on the 347th day.
A week is a repeating pattern of seven days. That means, for example, that the first, eighth, 15th, 22nd, and so on always fall on the same day of the week. Therefore, it’s possible to determine which 13th days of a month fall on a given day of the week. To do this, simply divide the number of days in the year that have already passed on the date you’re investigating by 7. The remainder will tell you which day of the first week of the year that date matches.
This might sound complicated, but it's actually quite simple: when you divide the 13th day of the year by 7, for example, you get 1 with a remainder of 6. This means that the 13th day of the year falls on the same day of the week as the sixth day of the year. You can repeat this process for the 13th day of each month, which result in the following.
During a year with 365 days, January 13 and October 13 will fall on the same day of the week as the sixth day of the year. February 13, March 13 and November 13 will fall on the same day of the week as the second day of the year. April 13 and July 13 will fall on the same day of the week as the fifth day of the year. May 13 will fall on the same day of the week as the seventh day of the year, recorded in the chart as the zeroth day of the year. June 13 will fall on the same day as the third day of the year. August 13 will fall on the same day of the week as the first day of the year. September 13 and December 13 will fall on the same day of the week as the fourth day of the year.
Each day of the week, labeled 0 to 6, appears at least once in the list. (And for those skipping the math and skimming the tables, the 0thday of the year is actually the 7th day.) This means that in a year with 365 days, each day of the week will be the 13th of a month at least once (days 0, 1 and 3 each appear only once). Days of the week can also be the 13th of a month twice (days 4, 5 and 6). And there is one day of the week that will be the 13th of a month three times (day 2).
So if the second day of a regular year is a Friday, then there will be three Friday the 13ths. This is the case in 2026.
But what if the year is a leap year, with 366 days? The previous calculations can be performed analogously, except in this case, February has 29 days.
During a leap year with 366 days, January 13 falls on the 13th day of the year; February 13 falls on the 44th day of the year; March 13 falls on the 73rd day of the year; April 13 falls on the 104th day of the year; May 13 falls on the 134th day of the year; June 13 falls on the 165th day of the year; July 13 falls on the 195th day of the year; August 13 falls on the 226th day of the year; September 13 falls on the 257th day of the year; October 13 falls on the 287th day of the year; November 13 falls on the 318th day of the year; and December 13 falls on the 348th day of the year.
Here, too, we must now examine which of these dates corresponds to which days of the week. Again, divide the number of days by 7 and calculate the remainder.
During a leap year, January 13, April 13 and July 13 will fall on the same day of the week as the sixth day of the year. February 13 and August 13 will fall on the same day of the week as the second day of the year. March 13 and November 13 will fall on the same day of the week as the third day of the year; May 13 will fall on the same day as the first day of the year; June 13 will fall on the same day of the week as the fourth day of the year; September 13 and December 15 will fall on the same day as the fifth day of the year; October 13 will fall on the same day of the week as the seventh day of the year, recorded in the chart as the zeroth day of the year.
During leap years, the days of the week shift, but the distribution of days of the week remains the same. Each day of the week appears at least once (days 0, 1 and 4). And there are still days of the week that are the 13th of the month twice (days 2, 3 and 5), as well as one day of the week that occurs three times (day 6). If Friday is the sixth day of the first week during a leap year, then there will be three Fridays on the13th of a month.
With this analysis, we can show that there will be at least one and at most three Fridays each year that are the 13th of a month. Superstitious people must face their fears every year; there’s no way around it.
Statistically speaking, the 13th of a month falls on a Friday more often than on any other day of the week. This may seem surprising, but it, too, can be demonstrated with mathematics.
To do this, we need to consider the peculiarities of the Gregorian calendar. If our years were always exactly 365 days, then the distribution of weekdays would repeat every seven years. To put this in a more formal way, every seven years would begin a new periodic cycle. After seven years, every date would align with the same day of the week that it was during the first year. In this seven-year-cycle scenario, the 13th day of a month will be each day of the week the same number of times: each weekday falls on the 13th of a month exactly 12 times in a seven-year period.
The Gregorian calendar is more complicated. Famously there is a leap day every four years—that shakes things up. Once you add in that complication, the distribution of weekdays is such that the cycle repeats itself only every 28 years, a span during which there are seven leap days (in years 0, 4, 8, 12, 16, 20 and 24).
But wait—our calendar system has even more quirks. In principle, there’s a leap year that occurs every four years, except every 100 years, when the leap day is omitted. And there is an exception to that exception when the year is divisible by 400; in that case, the leap day is added as normal. That is why the year 2000 was still a leap year despite being divisible by 100.
With that information, you can calculate that a full periodic cycle, wherein the weekdays will fall on the same dates and the leap year patterns repeat, takes 400 years. This period comprises 365 regular days per year times 400 years, or 146,000 regular days plus 97 leap days (400 / 4 – 3, where the 3 represents the skipped leap years of 100, 200 and 300). Unfortunately these leap days are not evenly distributed, which makes it impossible to break this into a smaller cycle. As an example of this irregularity, between 2000 and 2099, there will be 25 leap days, including the starting year, but in the following three centuries, there will only be 24 leap days.
Using a computer program, you can perform a concrete calculation to work through the implications of this pattern. The year 2000 was a leap year, and January 1 fell on a Saturday. Based on this information, you can calculate how many 13ths of the month will fall on which weekdays in the following 400 years—that is, from January 1, 2000, to December 31, 2399.
During the span of 400 years beginning on January 1, 2000, the 13th day of a month will fall on a Monday or Tuesday 685 times, on a Wednesday or Sunday 687 times, on a Thursday or Saturday 684 times and on a Friday 688 times.
In other words, the 13th of a month will be a Friday more times than any other day of the week. That’s bad news for superstitious people. But it’s worth remembering just how arbitrary all of this is. If January 1, 2000, was suddenly a Sunday, then a different day of the week would line up with the 13th with greater frequency.