pakled wrote:
As I remember;The current calendar system has leap years in every year divisible by four,
exceptfor the Centenary years, but only every 400 years (2000 was a leap year, but 1900 was not)
Don't blame me, blame Rome...

Actually since the year is ~365.24 days long, that is one of the most logical ways to do it.
Basically you had to solve the series {2,1,1,1,2,1,1,1, ...} for the first sum divisible by 7. (365%7=1)