The USSR Olympiad Problem Book
#14.* (a) On which of the two days of the week, Saturday or Sunday, does New Year's Day fall more often?
(b) On which day of the week does the thirtieth of the month fall more often?
Hint. It is not the case that New Year's Day falls on each day of the week with equal probability.
The Gregorian calendar cycles exactly every 400 years, so look at any 400-year period. Every year a multiple of 4
is a leap year except multiples of 100 that are not multiples of 400 (1700, 1800, and 1900 were not leap
years, but 2000 was). Go through an entire 400-year cycle in 28-year mini cycles. Or just bite the bullet and
write a Python program, a whole lot easier but not available in days past and not as revealing of calendar facts.