News for hackers. Stuff that matters.
Re:Math and Puzzle Fans Find Magic in Martin Gardner's Legacy by tromp on Saturday November 02, 2024 @04:28AM (#42024916)
But if the pair of (date, weekday) repeats every 400*7 years, then it still works out exactly?!
Re:Math and Puzzle Fans Find Magic in Martin Gardner's Legacy by bumbledraven on Saturday November 02, 2024 @01:17PM (#42027699)
In the Gregorian calendar, January 1 falls on a Saturday in any year that is a multiple of 400. (This follows from any correct day-of-the-week algorithm, such as https://firstsundaydoomsday.blogspot.com/2009/12/quick-start....) Since each 400-year cycle begins on the same day, rather than balancing out, any imbalances would actually accumulate.

To check, see this 5-line brute-force calculation in JavaScript: https://news.ycombinator.com/item?id=42024474

Re:Math and Puzzle Fans Find Magic in Martin Gardner's Legacy by tromp on Monday November 04, 2024 @06:56AM (#42040710)
Ah, the number of days in 400 years is 400 * 365 + 97 = (57*7+1) * (52*7+1) + (14*7-1) = 0 mod 7, so indeed it doesn't work out.
Re:Math and Puzzle Fans Find Magic in Martin Gardner's Legacy by madcaptenor on Monday November 04, 2024 @10:07AM (#42042193)
Exactly.