On what day of the week does the 13th of a month fall most often during a Gregorian 400 year cycle?

This problem's question: On what day of the week does the 13th of a month fall most often during a Gregorian 400 year cycle?

If a year number is not divisible by four evenly, then it is a 365 day year (ordinary), otherwise if a year number is not divisible by 100 evenly, then it is a 366 day year (leap), otherwise if a year number is not divisible by 400 evenly, then it is a 365 day year (ordinary), otherwise it is a 366 day (leap) year.

January 1, 2001, was a Monday.

Wednesday Monday Friday Saturday Thursday Sunday Tuesday

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Kyle T
Jun 4, 2019

Just confirming, I got the same counts as you
Friday happens once more than any other day
(Friday the 13th oooooh spooky)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
$results = array();
$days = array('sun','mon','tue','wed','thu','fri','sat');
for($i=0;$i<=6;$i++){
    $results[$days[$i]] = 0;
}
for($y=2001;$y<=2400;$y++){
    for($m=1;$m<=12;$m++){
        $time = mktime(0,0,0,$m,13,$y);
        $results[$days[date('w',$time)]]++;
    }
}
echo '<pre>'.print_r($results,true).'</pre>';
/*
Array
(
    [sun] => 687
    [mon] => 685
    [tue] => 685
    [wed] => 687
    [thu] => 684
    [fri] => 688
    [sat] => 684
)
*/
?>

Actually, considering that my development of the counts was done in Wolfram Mathematica 12, our methodologies are very similar.

The counts:

Monday 685 Tuesday 685 Wednesday 687 Thursday 684 Friday 688 Saturday 684 Sunday 687 \begin{array}{lr} \text{Monday} & 685 \\ \text{Tuesday} & 685 \\ \text{Wednesday} & 687 \\ \text{Thursday} & 684 \\ \text{Friday} & 688 \\ \text{Saturday} & 684 \\ \text{Sunday} & 687 \\ \end{array}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...