First. Assuming your year is between more than $28$ years away from a year divisible by $100$ by not divisible be $400$. (This will hold for the years $1829-1871, 1929-2071, 2129-2179$ etc.)
For these span of years every year with $28$ years before and $28$ years later, it will hold that every four years will be a leap year.
Non-leap years will have $365 = 52*7 + 1$ days so each consecutive year will normally start one day later than the next. However the year after a leap year will occur two days after the previous year.
If you compare year $n$ to year $n + k$ and and if there are $j$ leap years between $n$ and $k$ then the year will start $k + j$ days later.
Every $28$ years the entire calendar system starts over again because $28$ years will have $7$ leap years and $28 + 7 = 35 = 5*7$ so the calendar will start on the same day and will be a leap year if the first year was a leap year and won't be a leap year if the year wasn't a leap year.
So. Year $n$....
Case 1: Year $n$ is a leap year. The calendar will repeat in $28$ years and was the same $28$ years ago.
Case 2: Year $n$ is one year more than a leap year. $n+6$ will have one leap year between them ($n + 3$) and so $6 + 1 =7$ so calendar $n + 6$ will start on the same day and will not be a leap year so the calendars will be the same.
Year $n-5$ will be a leap year and not the same calendar. $n -6$ will have two leap years between them $(n-1, n-5)$ and will start $6+2 = 8$ earlier. $n-11$ will have three leap years between them ($n-1, n-5, n-9$) and so will start $11 + 3 =14 = 2*7$ days earlier and will be the same calendar.
Case 3: $n$ is two years past a leap year.
$n+5$ is not the same date because there is one leap year between them so the calendars or off by $5+1=6$ days. $n+6$ is not the same calendar. There is one leap year between the so $6+1 = 7$ and they start on the same day, but $n+6$ is a leap year. We must go further. $n+11$ will have $3$ leap years between them ($n+2, n+6,n+10$ and thus will start $11 + 3 = 14=2*7$ days later and will be the same calendar.
$n-5$ isn't the same. (One leap year and $5$ days isn't a multiple of $7$.) Nor is $n-6$ (it's a leap year). But $n-11$ will have three leap years $(n-2, n-6, n-10)$ and so will be $11 + 3 = 14$ days offset and the calendars will be the same.
Case 4: $n$ is 3 years past a leap year (like $2019$ is)
Then $n+5$ is a leap year $n+6$ has two leap years between and $n + 11$ will have $3$ leap years ($n+1, n+5, n+9$) and so be offset by $14$ and have the same calendar.
So $2030$ will be the next year with the same calendars.
And $n-6$ will have one leap year between them $n-3$ and so be offset by $6+1 = 7$ days and have the same calender. So $2013$ had the same.
Monkey Wrench. Years divisible by $100$ by not by $400$ do not have leap days and they throw the system off.
But again we can calculate those much the same.
Best Answer
Too long for a comment.
I assume you are not allowed access to a calculator. From Griboullis's hint, you know that if $x$ exists, $224 ≤ x ≤ 225$, so the only thing to do is to find the fractional part, which is given by $\lfloor x\rfloor\;+\;\lfloor 2x\rfloor\;+\;\lfloor 4x\rfloor\;+\;\lfloor16x\rfloor\;+\;\lfloor32x\rfloor\;=25$.
Then prove that the function jumps by one unit whenever $x$ is only a multiple of $\frac{1}{32}$, by two units whenever $x$ is only a multiple of $\frac{1}{16}$, and you can work out for the rest up to a jump of four units whenever $x$ is a multiple of $\frac{1}{2}$. Adding up all these jumps methodically should lead you to the point $(0.499, 23)$ (in the simplified question), at which point the next jump gives $(0.5, 27)$. Transforming the question back to the original question will complete the proof