How many years later the calendar of 2016 can be reused? How many years later the calendar of 2016 can be reused?
I was asked this question in an exam. I want to explain the term 'reuse' . If we ignore the holidays and our only purpose is to check the date of a particular day , then only we can reuse a past year calendar.
My attempt: 
I have divided years in two parts . One part consists of January and  February Months and other part will contain the rest of the months. 
Any date between the 1st January to the 28th February of 2017 will occur two days later of that of 2016. This date of 2018 will occur 3 days later of that of 2016.
Thus we get the same date of 2020 will occur 5 days later of that of 2016.
Any date between the 1st March to the 31th December of 2017 will occur 1 day later of that of 2016. This date of 2018 will occur 2 days later of that of 2016.This date of 2019 will occur 3 days later of that of 2016. This date of 2020 will occur 5 days later of that of 2016.
So after 4 years any date of 2020 will occur on 5 days later of that of 2016. So after 28 years in 2044 for the first time we will get to use the calendar of 2016. So we have to wait at least 28 years to reuse the calendar of 2016.
Have I gone wrong anywhere? Can anyone please check my attempt?
 A: Yes, you are right (temporarily). 
As you noted, leap years have a different shape from others. So if you start with a leap year calendar, the next leap year calendar will come 4 years later. 
The calendar for each leap year is $4+1=5$ days “ahead” of the previous one, so each step from one leap year to the next takes you 5 steps forward. Since 5 and 7 are relatively prime, you have to take seven 5-step jumps before you get back to the original calendar. And seven jumps of 4 years make 28 years, so you are right. 
Enjoy your triumph while you can, because 2100 is not a leap year and all your calculations will fail. One major software package (was it Lotus 1-2-3?) thought that 1900 was a leap year, which it isn’t, and consequently had as its “zero” of date numbers a day one day earlier than any sensible person would have put it. All later spreadsheet programs have to be compatible with that, so the strange “zero” (30 December 1899 instead of 31 December) will be built into every program from now until the human race becomes extinct. 
A: Exhaustively:
As $365\bmod7=1$, the calendar shifts by one week-day every year. Except on a leap year, which shifts by two.
In green the leap years, in red the multiples of seven:
$$\color{green}{2016}:\color{red}{+00}
\\2017:+02
\\2018:+03
\\2019:+04
\\\color{green}{2020}:+05
\\2021:\color{red}{+07}
\\2022:+08
\\2023:+09
\\\color{green}{2024}:+10
\\2025:+12
\\2026:+13
\\2027:\color{red}{+14}
\\\color{green}{2028}:+15
\\2029:+17
\\2030:+18
\\2031:+19
\\\color{green}{2032}:+20
\\2033:+22
\\2034:+23
\\2035:+24
\\\color{green}{2036}:+25
\\2037:+27
\\2038:\color{red}{+28}
\\2039:+29
\\\color{green}{2040}:+30
\\2041:+32
\\2042:+33
\\2043:+34
\\\color{green}{2044}:\color{red}{+35}
$$
A: Your answer is right.  
But notice that $2016$ is a leap year so any reusable year must be a leap year as well.  So the number of years must be divisible by $4$.
A four year period has, including one leap day, $4*365+1 = 1461$ days.  Divide by $7$ and we get that a four year period is $208$ weeks and $5$ days.  So the calendar will be $4$ days ahead.
After $4k$ years the calendar will be $5k$ days ahead.  If $5k$ is a multiple of $7$ (and only if $5k$ is a multiple of $7$) the calendar will be starting on the same day.  
The smallest possible (positive) value for $k$ to be so that $5k$ is divisible by $7$ is if $k = 7$.
So $4k = 4*7 =28$ is the shortest period before the calendar will be good again.
Note if you didn't start on a leap you the reusable year doesn't have to be a multiple of $4$ away.  A normal year will offset the days by $1$ day because $365 = 7*52 + 1$ and you get one extra day in a year.  But leap days will offset by addition days.  So if $m$ is the number of years then you had either $\lfloor \frac m4\rfloor$ or $\lceil \frac m4\rceil$ leapdays depending.  Call it $d$.  So you need $m + d$ to be divisible by $7$. ANd you need the resulting year to not be a leap year.  But it differs on the year.  It can $6$ if there is one leap year between the two years.  (Example $2017$ and $2023$ can share calendars... the diference is six years and one leap year and $7$ divides $6*365 + 1$)  It can't be $5$ years with two leap years because that would mean one or the other was a leap year.  But it can be $11$ years with three leap years between if the first year was a year before a leap year and the last year is a year after a leap year.
