E.g. I'm using this formulas for calculating day of week (Julian calendar):
\begin{align} a & = \left\lfloor\frac{14 - \text{month}}{12}\right\rfloor\\ y & = \text{year} + 4800 - a \\ m & = \text{month} + 12a - 3 \end{align} \begin{align} J\!D\!N = (\text{day} + \left\lfloor\frac{153m+2}{5}\right\rfloor + 365y+ \left\lfloor\frac{y}{4}\right\rfloor - \left\lfloor\frac{y}{100}\right\rfloor + \left\lfloor\frac{y}{400}\right\rfloor - 32045)\text{mod}\text{7} \end{align}And I know that in Julian calendar, leap year is a year which:
\begin{align} \text{year}\:mod\:4=0 \end{align}
Using simple python program, I can solve this problem very fast. And answer (if we starting for leap year) is 28 year cycle.
But how to correctly prove this hypothesis, using only math equations? Is it possible?