This article is from the Calendars FAQ, by Claus Tondering email@example.com with numerous contributions by others.
Each year is associated with a Golden Number.
Considering that the relationship between the moon's phases and the
days of the year repeats itself every 19 years (as described in
section 1), it is natural to associate a number between 1 and 19
with each year. This number is the so-called Golden Number. It is
GoldenNumber = (year mod 19)+1
In years which have the same Golden Number, the new moon will fall on
(approximately) the same date. The Golden Number is sufficient to
calculate the Paschal full moon in the Julian calendar.