top | item 47162054

(no title)

userbinator | 5 days ago

This is simply the fact that 365 % 7 == 1, with leap year adjustments.

discuss

order

kmm|5 days ago

That's correct, but it's pretty well-hidden because at first sight there is no term that's just the year modulo 7. That's because a Gregorian calendar cycle of 400 years is coincidentally an integer amount of weeks long, so after the term modulo 400 you don't need another correction anymore.

To recover the fact that 365 % 7 == 1 from the given formula, one can notice that the sum of the coefficients 5+4+6=15, which modulo 7 is 1.

croes|4 days ago

I guess the leap year adjustment is the tricky part