For D > 0 not a square, D congruent to 1 modulo 4, let L1 = L1(D) and
L4 = L4(D) denote the lengths of the periods of the continued fraction
expansions of \sqrt{D} and (1+\sqrt{D})/2 respectively. Literature I am
aware of does not, to my reading, prohibit L1 = L4 + 4 for any L4 >= 1.
I have proved that if L4 = 3, then L1 = 7 is not possible. If L4 = 3
then L1 can only be 1, 5, 11, or 15. Based on empirical testing (for D
up to 15 billion with L4 <= 255), it appears that it is not possible to
have L1 = L4 + 4 when L4 is congruent to 3 modulo 6.
My question is whether any of this is previously known. Is there anything
in the literature, or things known to practitioners, that bear on this?
My own summary (and I could be misinterpreting what I've read) of possible
relationships between L1 and L4 is below. It would appear that everything
not prohibited by those relationships does actually occur for some D,
except L1 = L4 + 4 when L4 is congruent to 3 modulo 6. In particular,
if k is not 3 modulo 6, then it appears that there is a D so that
L4(D) = k and L1(D) = k + 4.
The (fairly elementary) proof that L4 = 3, L1 = 7 is not possible is
at my website
http://hometown.aol.com/jpr2718/
Or I will be happy to email the proof; specify PDF, DVI, or LaTeX file.
My summary of possible relationships between L1 and L4 follows.
For D >= 17, not a square, D == 1 (mod 4):
If L4 == 1 (mod 2) then either
L1 == L4 (mod 4), and
L4 + 4 <= L1 <= 5L4,
or
L1 + L4 == 0 (mod 4), and
(1/3)L4 <= L1 <= 3L4 - 4.
If L4 == 0 (mod 2) then L1 == L4 (mod 4), L1 <= 5L4, and
L1 >= 6 for L4 = 2,
and
L1 >= (1/3)L4 for L4 >= 4.
John Robertson
JPR2718@AOL.COM
References
Kenneth S. Williams and Nicholas Buck, "Comparison of the Lengths of the
Continued Fractions of sqrt(D) and (1+sqrt(D))/2," Proceedings of the AMS
120, No. 4, April 1994, pp 995-1002.
Noburo Ishii, Pierre Kaplan, and Kenneth S. Williams, "On Eisenstein's
problem," Acta Arithmetica, LIV (1990), pp 323-345.