From: alf@mpce.mq.edu.au (Alf van der Poorten) Newsgroups: sci.math.numberthy Subject: Re: continued fractions Date: 3 May 96 01:19:23 GMT Actually, this kind of thing is fairly well understood. One knows well (also as a special case of a theorem of Schinzel) that the period of $\sqrt{X^2-C}$ is bounded as $X$ varies iff $C$ divides $4$. So the suggestion (that $\sqrt{X^2-18}$ never has period longer than $20$) is apparently false. [I'm weaselling a bit because I haven't time to look at a few examples. Were it not for that theorem I'd be muttering that the period length apparently depends on $X$ modulo $b^2$. I'm wondering just what I'm forgetting that allows that theorem to be true]. By the way, the suggestion that $\sqrt{X^2-18}$ always has period of length $20$ once $X$ is sufficiently large is plainly wrong. Just try $X$ divisible by $9$; $\sqrt{306}$ is a small example. Hugh Williams and I have been "actively" writing a paper on an aspect of these things [but when I looked I noticed that I last modified the file on 28 May, so perhaps I should use the present question as a cue to reactivate the matter]. -------- At round about 08:40 -0400 on 02:05:1996, Allen Adler wrote: If a prime p is of the form x^2-2, where x is odd, then the continued fraction expansion of sqrt(p) is given by _____________ [a-1,1,a-2,1,2*a-2] I'd like to know about general results of this type for sqrt(p) for other primes of the form 8n+7. Each such prime can be written as a^2-2*b^2, so we have just considered the case b=1. For example, what about b=3, p=a^2-18. One complication appears immediately, namely for p=31=7^2-18 the continued fraction expansion is ________________ [5,1,1,3,5,3,1,1,10] while for p=151=13^2-18, it is _________________________________________ [12,3,2,7,1,3,4,1,1,1,11,1,1,1,4,3,1,7,2,3,24]. The nonrepeating part is a-2=5 for p=31, a=7, while for p=151, the nonrepeating part is a-1=12. For 151 and larger primes of the form a^2-18, the nonrepeating part will be a-1. So one can expect that for each b, there will be a small number of atypical cases involving smaller primes, but that there will be a common pattern for all p of the form 8n+7=a^2-2*b^2 larger than a certain bound depending on b. On these grounds, while the case p=31 has a repeating part of length 8, I would guess that the cases p=151 would represent the general behavior, with a repeating part of length 20. _____________ I would like to know of the formulas, analogous to [a-1,1,a-2,1,2*a-2] for large primes of the form 8n+7=a^2-2*b^2, for each odd b. If one can say something general for all odd b, that would be great, but I don't really expect there to be anything so simple. Description of the bound and the exceptional behavior below the bound would also be of interest. If you know any results along these lines or can compute some of these formulas with a symbolic algebra package, please let me know. Allan Adler adler@pulsar.cs.wku.edu ------------------------ Alf van der Poorten ceNTRe for Number Theory Research alf@mpce.mq.edu.au http://www.mpce.mq.edu.au/~alf/ fax: +61 2 850 9502 voice: +61 2 850 9500 home: +61 2 416 6026 Do you believe in Macintosh? Learn how to help the Macintosh cause by subscribing to EvangeList, a listserver for Macintosh fans. To receive instructions, send an email to . Do you enjoy mathematics? Rush off to order a copy of "Notes on Fermat's Last Theorem" published by Wiley-Interscience at US\$44.95 For details see [revised]. "The poetry far excels that normally found in math books". H W Lenstra. -----------------------