In 1800, Gauss published this algorithm for computing the date of Easter in a given year $year$:
$a = year \mod 19$
$b = year \mod 4$
$c = year \mod 7$
$k = \lfloor year/100 \rfloor$
$p = \lfloor (13 + 8k)/25 \rfloor$
$q = \lfloor k/4 \rfloor$
$M = (15 − p + k − q) \mod 30$
$N = (4 + k − q) \mod 7$
$d = (19a + M) \mod 30$
$e = (2b + 4c + 6d + N) \mod 7$
Gregorian Easter is $22 + d + e$ March or $d + e − 9$ April
if $d = 29$ and $e = 6$, replace 26 April with 19 April
if $d = 28$, $e = 6$, and $(11M + 11) \mod 30 < 19$, replace 25 April with 18 April
I've tried my best to decode this formula, but it remains a complete mystery to me. It doesn't help that Gauss himself states:
Die Analyse, vermittels welcher obige Formel gefunden wurde [...], lässt sich daher freilich in ihrer ganzen Einfachheit hier nicht darstellen [...]
("It is not possible to present here the entire analysis that led to the above formula")
I would like to be able to derive this formula myself. How can I do that? I know Easter falls on the first Sunday following the first full moon in Spring, but how to go from there? Naturally, I would expect the numbers $7$ and $30$ to be involved given that we are dealing with dates here, but where do $19$, $13$, $6$ and $8$ come from?
I did a version with australs.
You suppose the day is divided into 19 australs, and that there are 570 australs in the month. So what we do is calculate in which austral the moon falls in, what day it is, and then the sunday thereafter.
The gauss version is actually wrong. The ccorrect alculation and commentary is given in O'Breine's book "Puzzles and Paradoxes". The correct form was published by an anomynus new york correspondant to the Nature in 1876. This program replicates that method.
QBASIC does not read the command line, so we save it to an environment variable, and pull it into s$.
In the above program, you get a print of the easter moon, and the following sunday.
Australs
As part of my investigation, i restructured this into something i can understand.
We calculate which austral the full moon falls in, there being 19 australs in the day, and 570 australs in the month. The australs are numbered from 0 on the 23 march, and count forward.
There are 235 lunar months in 19 years, or 12 full months and 7/19 parts. The year starts 7/19 months later, and thus the full moon advances 12/19 each year. That's 360 australs. The golden number and the day it falls on, can be found simply by doing (360 * year + c ) MOD 570, where c is some constant. This is the julian calendar, where the solar and lunar years are 365.25 days each. Note for this part, the leap year day is ignored.
The gregorian calendar adjusts the lengths of both years, to 365.2425 days and 365.2468 days respectively. This is done by droping a 3 leap years over 400 years, and adding 8 epacts (age of the moon at 1 jan) every 2500 years.
Each of these shifts occur on the century boundaries.
A day, or 19 australs is ADDED whenever a leap year day is deleted. This represents the fact that 19 australs that would have disappeardd on 29 feb are still around.
A day, or 19 australs, is SUBTRACTED, whenever there is a shift in the epact. The age of the moon is increased by a day, which takes the 19 australs.
The last three days are condensed into two, that the first day comprises of 27 australs, and the second of 30 australs.
The leap year australs are added, when the year is a multiple of 100, but not of 400.
The epact australs are subtracted, 8 times every 2500 years. This is what happens at gg in the program.
Because the easter month is rated at 29 days only, the last two days are taken to be 27 and 30 australs, rather than 19 days each.
Other calendars
Once this was understood, it helped devise easter days for other calendars. The simplest one runs like this.
1, The year starts on 1 march. The leap year day is new year's eve.
2, Years that give year mod 33 mod 4 = 3 are leap. The year makes 365.242424 days
3, An epact is added every 231 years, the luner year being 365.246753 days.
Alternately, a golden jump, by subtracting 30, equates to moving the moon to the next spot on the golden cycle. One adds 8 for each jump, which occurs every 363 years.
The lunar year here could be described as adding 19 leap year days every 77 years.
The exact periods, as of the current calendar, are
You get something like this: