You would think that the 13th of the month would occur exactly one-seventh of the time on Friday, but that’s not quite right.
I too would have said (actually have done so) that it would all average out in the end to give 1/7 for each day, but it turns out that with the Gregorian calendar it is not true. It would be 1/7 for each if leap years were every 4 years. However, the Gregorian calendar has only 97 leap years (rather than 100) in each 400. Only centuries divisible by 4 (such as 2000) are leap years, not others (such as 1900, 2100).
This complication of the Gregorian calendar would still not cause the balance between different days to be disturbed except for an arithmetic accident. The number of days in the Gregorian 400 year leap year cycle happens to be divisible by 7 (400 x 365 + 97 = 20871 x 7). Hence the days of the month repeat after this time (rather than after 7 x 400 = 2800 years, as it would be if the number of days in the 400 year cycle was not divisible by 7).
The irregular way the leap years appear in these 400 years causes an asymmetry in the days that occur on each date in the year. …the 13th occurs more on a Friday than other days. It so happens that Thursday and Saturday are the days that occur least often on the 13th.
I read the factoid about Friday 13th in Ripley's Believe it or Not, and I found it necessary to do the calculation myself in a spreadsheet, which gave me the following graph of the frequencies of the days that occur on 13th of a month, over the whole 400 year cycle, so here they are.
The frequency of all dates in the month over the 400 year cycle is as follows:
1st to 28th occur 12 x400 times
29th occurs (400 x 11 + 97) times
30th occurs (400 x 11) times
31st occurs (400 x 7) times
So all dates other than the 31st occur a number of times not divisible by 7, so they must have an irregular distribution of days. I am not sure about the 31st, and can't be quite bothered to find out right now.