Discrepancy between Gregorian Year and Tropical Year

Theorem
The Gregorian year and the tropical year differ such that the Gregorian calendar becomes $1$ day further out approximately every $3319$ years.

Proof
By definition, the length $Y_T$ of the tropical year is defined as $\approx 365 \cdotp 24219 \, 878$ days.

By definition of the Gregorian year:
 * $Y_G = \begin{cases} 366 \, \text {days} & : 400 \divides y \\

365 \, \text {days} & : 400 \nmid y \text { and } 100 \divides y\\ 366 \, \text {days} & : 100 \nmid y \text { and } 4 \divides y\\ 365 \, \text {days} & : 4 \nmid y \end{cases}$ where:
 * $Y_G$ denotes the length of the Gregorian year in days
 * $y$ denotes the number of the year
 * $4 \divides y$ denotes that $y$ is divisible by $4$
 * $4 \nmid y$ denotes that $y$ is not divisible by $4$.

Thus in every $400$ years, there are:
 * $300$ years which are not divisible by $4$, which have $365$ days
 * $1$ year which is divisible by $400$, which has $366$ days
 * $3$ years which are divisible by $100$ but not $400$, which have $365$ days
 * The remaining $96$ years which are divisible by $4$ but not $100$, which have $366$ days.

Thus:

Thus the mean Gregorian year is $\dfrac 1 {3318 \cdotp 95}$ days longer than the tropical year.

This means that after approximately $3319$ Gregorian years, the Gregorian calendar starts one day later relative to the tropical year.