A periodic continued fraction is a continued fraction whose terms eventually repeat from some point onwards. The minimal number
of repeating terms is called the period of the continued fraction. All nontrivial
periodic continued fractions represent irrational numbers. In general, an infinite
simple fraction (periodic or otherwise) represents a unique irrational number, and
each irrational number has a unique infinite continued fraction.
The square root of a squarefree integer
has a periodic continued fraction of
the form
![sqrt(n)=[a_0,a_1,a_2,a_3,...,a_2,a_1,2a_0^_]](/images/equations/PeriodicContinuedFraction/NumberedEquation1.gif) |
(1)
|
(Rose 1994, p. 130), where the repeating portion (excluding the last term) is symmetric upon reversal, and the central term may appear either once or twice.
If is not a square number, then the terms of the continued fraction of
satisfy
 |
(2)
|
An even stronger result is that a continued fraction is periodic iff it is a root
of a quadratic polynomial.
Calling the portion of a number remaining after
a given convergent the "tail," it must be true that the relationship between
the number and terms in its tail is of the form
 |
(3)
|
which can only lead to a quadratic
equation.
The periods of the continued fractions of the square roots of the first few nonsquare integers 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, ... (Sloane's A000037) are 1, 2, 1, 2, 4, 2, 1, 2, 2, 5, ... (Sloane's A013943;
Williams 1981, Jacobson et al. 1995). These numbers and their continued fraction
representations are summarized in the following table.
 |  |  |  | | 2 | ![[1,2^_]](/images/equations/PeriodicContinuedFraction/Inline9.gif) | 22 | ![[4,1,2,4,2,1,8^_]](/images/equations/PeriodicContinuedFraction/Inline10.gif) | | 3 | ![[1,1,2^_]](/images/equations/PeriodicContinuedFraction/Inline11.gif) | 23 | ![[4,1,3,1,8^_]](/images/equations/PeriodicContinuedFraction/Inline12.gif) | | 5 | ![[2,4^_]](/images/equations/PeriodicContinuedFraction/Inline13.gif) | 24 | ![[4,1,8^_]](/images/equations/PeriodicContinuedFraction/Inline14.gif) | | 6 | ![[2,2,4^_]](/images/equations/PeriodicContinuedFraction/Inline15.gif) | 26 | ![[5,10^_]](/images/equations/PeriodicContinuedFraction/Inline16.gif) | | 7 | ![[2,1,1,1,4^_]](/images/equations/PeriodicContinuedFraction/Inline17.gif) | 27 | ![[5,5,10^_]](/images/equations/PeriodicContinuedFraction/Inline18.gif) | | 8 | ![[2,1,4^_]](/images/equations/PeriodicContinuedFraction/Inline19.gif) | 28 | ![[5,3,2,3,10^_]](/images/equations/PeriodicContinuedFraction/Inline20.gif) | | 10 | ![[3,6^_]](/images/equations/PeriodicContinuedFraction/Inline21.gif) | 29 | ![[5,2,1,1,2,10^_]](/images/equations/PeriodicContinuedFraction/Inline22.gif) | | 11 | ![[3,3,6^_]](/images/equations/PeriodicContinuedFraction/Inline23.gif) | 30 | ![[5,2,10^_]](/images/equations/PeriodicContinuedFraction/Inline24.gif) | | 12 | ![[3,2,6^_]](/images/equations/PeriodicContinuedFraction/Inline25.gif) | 31 | ![[5,1,1,3,5,3,1,1,10^_]](/images/equations/PeriodicContinuedFraction/Inline26.gif) | | 13 | ![[3,1,1,1,1,6^_]](/images/equations/PeriodicContinuedFraction/Inline27.gif) | 32 | ![[5,1,1,1,10^_]](/images/equations/PeriodicContinuedFraction/Inline28.gif) | | 14 | ![[3,1,2,1,6^_]](/images/equations/PeriodicContinuedFraction/Inline29.gif) | 33 | ![[5,1,2,1,10^_]](/images/equations/PeriodicContinuedFraction/Inline30.gif) | | 15 | ![[3,1,6^_]](/images/equations/PeriodicContinuedFraction/Inline31.gif) | 34 | ![[5,1,4,1,10^_]](/images/equations/PeriodicContinuedFraction/Inline32.gif) | | 17 | ![[4,8^_]](/images/equations/PeriodicContinuedFraction/Inline33.gif) | 35 | ![[5,1,10^_]](/images/equations/PeriodicContinuedFraction/Inline34.gif) | | 18 | ![[4,4,8^_]](/images/equations/PeriodicContinuedFraction/Inline35.gif) | 37 | ![[6,12^_]](/images/equations/PeriodicContinuedFraction/Inline36.gif) | | 19 | ![[4,2,1,3,1,2,8^_]](/images/equations/PeriodicContinuedFraction/Inline37.gif) | 38 | ![[6,6,12^_]](/images/equations/PeriodicContinuedFraction/Inline38.gif) | | 20 | ![[4,2,8^_]](/images/equations/PeriodicContinuedFraction/Inline39.gif) | 39 | ![[6,4,12^_]](/images/equations/PeriodicContinuedFraction/Inline40.gif) | | 21 | ![[4,1,1,2,1,1,8^_]](/images/equations/PeriodicContinuedFraction/Inline41.gif) | 40 | ![[6,3,12^_]](/images/equations/PeriodicContinuedFraction/Inline42.gif) |
An upper bound for the length of the period is roughly . The
least positive s such that the
continued fraction of has period
, 2, ... are 2, 3, 41, 7, 13, 19, 58,
31, 106, ... (Sloane's A013646). The first few values of such that the continued
fraction of has period are summarized
below for small .
 | Sloane |  | | 1 | A002522 | 2, 5, 10, 17, 26, 37, 50, 65,
82, 101, ... | | 2 | A013642 | 3, 6, 8, 11, 12, 15, 18, 20, 24, 27, ... | | 3 | A013643 | 41, 130, 269, 370, 458, ... | | 4 | A013644 | 7, 14, 23, 28, 32, 33, 34, 47,
55, 60, ... | | 5 | A010337 | 13, 29, 53, 74, 85, 89, 125, 173, 185, 218, ... | | 6 | A020347 | 19, 21, 22, 45, 52, 54, 57, 59,
70, 77, ... | | 7 | A010338 | 58, 73, 202, 250, 274, 314, 349, 425, ... | | 8 | A020348 | 31, 44, 69, 71, 91, 92, 108, 135,
153, 158, ... | | 9 | A010339 | 106, 113, 137, 149, 265, 389, 493, ... | | 10 | A020349 | 43, 67, 86, 93, 115, 116, 118,
129, 154, 159, ... |
The values of at which the period
of the continued fraction of increases
are 1, 2, 3, 7, 13, 19, 31, 43, 46, 94, 139, 151, 166, 211, 331, 421, 526, 571, ...
(Sloane's A013645).
General identities for periodic continued fractions include
(Wall 1948, pp. 39 and 83).
The first follows from
Therefore,
 |
(13)
|
so plugging (13) into (12)
gives
 |
(14)
|
Expanding
 |
(15)
|
and solving using the quadratic
formula gives
 |
(16)
|
The analog of this treatment in the general case gives
 |
(17)
|
Liberman, H. Simple Continued Fractions: An Elementary to Research Level Approach.
SMD Stock Analysts, 2003.
Rose, H. E. A Course in Number Theory, 2nd ed. Oxford, England: Oxford
University Press, 1994.
Rosen, K. H. Elementary Number Theory and Its Applications. New York:
Addison-Wesley, p. 426, 1980.
Sloane, N. J. A. Sequences A010337, A010338, A010339, A013642, A013643, A013644, A013645, A013646, A020347, A020348, and A020349 in "The On-Line Encyclopedia of Integer Sequences."
Wall, H. S. Analytic Theory of Continued Fractions. New York: Chelsea,
1948.
|