Modern Calendar and Continued Fractions: 1 Very Brief History
Modern Calendar and Continued Fractions: 1 Very Brief History
Yury Grabovsky
Department of Mathematics
Temple University
[email protected]
1
was noticed and suggestions were made to correct it. Finally, in 1582 Pope Gregory XIII
assembled a commission to design a new more precise calendar system. The main author of
the new system was the Naples astronomer Aloysius Lilius. Following the recommendation
of his commission, Pope Gregory XIII decreed that the day following Oct. 4, 1582 would
be Oct. 15; that the years ending in 00 would be common years rather than leap years
- except those divisible by 400 and that New Year will start on January 1. The non-
Catholic world perceived the calendar decree as a Catholic ploy. It took nearly 200 years
for the change to come about. Great Britain and her colonies made the change in 1752
when September 2nd was followed by September 14 and New Years Day was changed from
March 25 to January 1.
If your computer has a calendar program that can display calendars for 1582 and 1752,
you can check the religious faith of your computer. For example, on my Linux system the
results are
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 1 2 14 15 16
7 8 9 10 11 12 13 17 18 19 20 21 22 23
14 15 16 17 18 19 20 24 25 26 27 28 29 30
21 22 23 24 25 26 27
28 29 30 31
2 Continued fractions
The history of continued fractions can be traced back to an algorithm of Euclid. Let us recall
this algorithm. Suppose we would like to find the greatest common divisor of numbers 75
and 33.
2
75 9
75 = 2 33 + 9 =2+
33 33
75 9 1
33 = 3 9 + 6 =2+ =2+
33 39+6 6
3+
9
75 1 1
9= 16+3 =2+ =2+
33 6 1
3+ 3+
16+3 3
1+
6
75 1 1
6= 23 =2+ =2+
33 1 1
3+ 3+
3 1
1+ 1+
23 2
The last non-zero remainder, 3 in our case, is the greatest common divisor of 75 and
33. There is no evidence though that Greeks knew about the connection between the left
column and the right column above. The first continued fraction was used in 1572 by
Bombelli to approximate 13. The first infinite continued fraction appears in 1659 in the
work of Lord Brouncker to expand 4/. It is Eulers systematic development of the theory
starting in 1737 that showed the value of the notion for both number theory and analysis.
A torrent of results followed. In 18th and 19th centuries everybody who was anybody in
mathematics contributed. If the number is rational the continued fraction terminates like
for 75/33. If the number isirrational the continued fraction goes on forever. For example,
for the irrational number 2 we can execute the Euclidean algorithm, in essence looking
for the greatest common divisor of 2 and 1. The algorithm will never terminate since the
two numbers are incommensurate.
1
2 = 1 + 0.41421356 . . . = 1 + =
2.41421356 . . .
1 1
1+ =1+
2 + 0.41421356 . . . 1
2+
2 + 0.41421356 . . .
1
=1+ = ...
1
2+
1
2+
2 + 0.41421356 . . .
3
concluding
1
2= 1+
1
2+
1
2+
1
2+
..
.
The esthetic beauty of continued fractions may go some ways towards justifying the
significance of some numbers from algebra or geometry. The continued fraction expansion
1
=1+
1
1+
1
1+
1
1+
..
.
would suggest that the number = (1 + 5)/2 has some significance. In fact, this number
is none other than the golden ratio.
If we terminate the infinite continued fraction for the irrational number at the nth
step we will obtain a rational approximation n to . The rational number n is called the
nth convergent for . For example, the first 4 convergents to numbers 2 and are
= 2 = 2.41421356 . . . = 3.141592654 . . .
0 = 1 0 = 3
3 1 22 1
1 = =1+ 1 = =3+
2 2 7 7
7 1 333 1
2 = =1+ 2 = =3+
5 1 106 1
2+ 7+
2 15
17 1 355 1
3 = =1+ 3 = =3+
12 1 113 1
2+ 7+
1 1
2+ 15 +
2 1
41 1 103993 1
4 = =1+ 4 = =3+
29 1 33102 1
2+ 7+
1 1
2+ 15 +
1 1
2+ 1+
2 292
The name convergent comes from the fact that convergents do converge to the number.
For example,
4 4.2 104 4 5.8 1010
4
Here is the graph for 2
We see that convergents alternately lie above and below the exact value of 2.
Here is the graph for .
We see the same alternating pattern of approximation. In fact, this is true in general for
any number.
5
The speed of convergence of continued fractions to a number they represent varies from
number to number (but it is always very very fast). Here is a comparison between the
convergence errors for 2 (blue) and (red).
The continued fraction expansions have many remarkable properties. We will be interested
mainly in its approximating power relevant for the design of a good calendar system. It
turns out that the convergents n for the irrational number have superior approximating
properties. The following definition makes it precise what we mean by a good approxima-
tion.
Definition 1 The fraction p/q is called a good approximation for if for any q < q and
any integer p we have
|q p| < |q p |
6
The good approximations for 2 occur when q=2, 5, 12 and 29. The next good approxi-
mation occurs when q=70.
The good approximations for occur at q=7, 106 and 113. The next good approximation
does not occur before q=33,102.
7
Observe that the numbers q are exactly the denominators in the convergents for 2
and respectively. This is not an accident and holds in general for all convergents and for
all numbers . We state it precisely and unambiguously in the form of a Theorem.
8
continued fraction expansion of the number . For = 0.24219878 we have
1
0.24219878 =
1
4+
1
7+
1
1+
1
3+
.
5 + ..
which gives the following sequence of convergents:
p1 1 p2 7 p3 8 p4 31 p5 163
= , = , = , = , = .
q1 4 q2 29 q3 33 q4 128 q5 673
The first fraction in the sequence corresponds to the Julian 4 year cycle system with a
single leap year in the cycle. The remaining fractions offer very inconvenient cycle lengths:
29, 33, 128 and 673 years respectively. They are, therefore, rejected. (Nevertheless, the
idea of a 33-year period has crossed peoples minds. Such a calendar would indeed be
more precise than the current Gregorian calendar, but less precise than the 500-year cycle
calendar discussed below.) Instead, we would rather have a cycle several centuries long, if
the leap year selection rule is simple enough. So, assume that q = 100q , where q must be
an integer between 1 and 9. This corresponds to the problem of approximating the number
= 100 = 24.219878 by rationals.
1
0.24219878 100 = 24 +
1
4+
1
1+
1
1+
.
4 + ..
We easily compute first 4 convergents:
p1 97 p2 121 p3 218 p4 993
= , = , = , = .
q1 4 q2 5 q3 9 q4 41
We see that we have three candidates for the calendar model. The first one corresponds
to our Gregorian calendar. It is based on a 400 year cycle with 97 leap years: all those
divisible by 4 (there is a hundred of them) except 100th, 200th and 300th years making
up the needed 97 leap years in a cycle. The next fraction 121/5 corresponds to a 500 year
cycle calendar with 121 leap years in each cycle. In such a calendar every year divisible by
4 would be a leap year unless it is divisible by 100 with the exception of years divisible by
500, which are still leap years. This system is as simple and as convenient as the Gregorian
calendar and provides a better accuracy. The Gregorian year is 26 seconds longer than
the solar year resulting in 1 day error each 3,320 years. The 500 year cycle calendar is 17
seconds shorter than the solar year resulting in 1 day error each 5,031 years. The Pope
9
missed that one. The last choice for the calendar offers a 900 year cycle. However, with
218 leap years in the cycle the calendar requires to make 7 exceptions to the fourth year
leap rule (218 = 900 4 7). Making this arrangement would create a more complicated
calendar. And besides, the 900 year cycle may be just a bit too long to be convenient. So,
we would reject this more precise calendar in favor of the simpler ones.
This graph shows the difference between our Gregorian calendar time and the true solar
time over 100 years. The sawtooth oscillations are the insertions of leap years every four
years.
10
This graph shows the difference between our Gregorian calendar time and the true solar
time over 900 years. The individual leap year insertions are almost invisible. We clearly
see the effect of leap year omissions every century and the effect of the leap year every 4
centuries. In fact, if we omit the 400 year rule but keep omitting leap years every century
the calendar error will look like this:
11
The green line shows the Gregorian calendar error for comparison.
Even Gregorian calendar will accumulate a large error. Eventually.
Here the individual leap years are no longer visible. The smaller oscillations are centennial
omissions of leap years. These are grouped into repeating packets of four. We see that our
calendar accumulates error at the rate of about 1 day every 3,300 years.
We might speculate what can be done in the future to correct for the slowly accumulating
error of the Gregorian calendar. The idea is to keep the old system but make some very
infrequent corrections. Continued fractions come handy here again. In other words we are
looking for a much longer cycle length q, which would comprise several 400 year cycles
q = 400q , where q is the number of 400 year cycles in the new longer cycle. We then
expand 400 0.24219878 into a continued fraction.
1
400 0.24219878 = 96 +
1
1+
1
7+
1
3+
.
2 + ..
775 2422 5619
Convergents are 96, 97, , , , . . . The third convergent suggests a 8
8 25 58
400 = 3, 200 year cycle with 775 leap years altogether. Recall, that according to the
Gregorian calendar, there is 97 leap years in each 400 year cycle. So, within 8 cycles we
will have 8 97 = 776 leap years. Thus, canceling the leap year every 3,200 years will allow
12
us to keep Gregorian calendar in the intervening time, while making it much more precise.
The new system would accumulate a 1 day error in 100,000 years, that is never.
An even more interesting scenario would have been possible had the Pope done his
math. If our calendar was based on a 500 year cycle suggested above, then we would be
expanding 500 0.24219878 into a continued fraction.
1
500 0.24219878 = 121 +
1
10 +
1
16 +
1
3+
1
2+
.
2 + ..
with convergents
1211 19497 59702 138901 337504
[121, , , , , , . . .].
10 161 493 1147 2787
The second convergent 1211/10 suggests a new cycle length of 5,000 years with 1211 leap
years in the cycle. The 500 year cycle calendar would have 1210 leap years in 5,000 years.
In order to make 1211 leap years we might want to have February 30, 5000 in celebration
of the 5th millennium. The 5,000 year cycle calendar will accumulate a 1 day error in a
whopping 1 million years. This system has been suggested by Bernard Rasof (Continued
fractions and leap years, The Mathematics Teacher, 63, pp. 144-148, 445, 1970.) Be it as
it may, either the Pope didnt do his math (which I find unlikely), or the astronomical data
was not precise enough at the time to justify the 500 year cycle, or he had other reasons
for settling on the current calendar (for example, the coming-soon 1600 would not increase
the discrepancy between the two versions of the calendar under the 400 year cycle).
The continued fractions can also be used to discover the 19 year Metonic cycle of the
Hebrew calendar. In lunar calendars an extra month (from new moon to new moon) is
inserted in a leap year. As we mentioned in the beginning, there is 12.368267 lunations a
year. Expanding this number into a continued fraction we obtain
1
12.368267 = 12 +
1
2+
1
1+
1
2+
1
1+
1
1+
.
17 + . .
25 37 99 136 235 4131
with convergents 12, , , , , , , . . .. The Metonic cycle corresponds to
2 3 8 11 19 334
235
the sixth convergent , meaning that there is approximately 235 lunations in 19 years.
19
13
If all years contained 12 months then in 19 years we would have 19 12 = 228 months.
Therefore, we need to insert 7 more months to make it to 235. The actual leap year rule
requires a calculator: The year Y is a leap year if 7Y + 1 (mod 19) < 7.
If you want to learn more about continued fractions the books
Jones, William B.; Thron, Wolfgang J. Continued fractions. Analytic theory and
applications. With a foreword by Felix E. Browder. With an introduction by Peter
Henrici. Encyclopedia of Mathematics and its Applications, 11. Addison-Wesley
Publishing Co., Reading, Mass., 1980.
are excellent references. The calendar history and continued fractions are also discussed in
two Mathematical Intelligencer articles:
Dutka, Jacques On the Gregorian revision of the Julian calendar, Math. Intelli-
gencer, 10 (1988), no. 1, 5664.
There is another web site that discusses both the calendar and the continued fractions. It
focuses, however, more on the calendar part than on continued fractions.
Finally, I would like to mention that I got my idea for doing the public lecture about it
on February 29, 2000 from an article in January/February 2000 issue of one of my favorite
(and no longer published in the US) magazines Quantum.
14