bug in continued fraction expansion ?



On 2012-05-31, jcarbaut at voila.fr <jcarbaut at voila.fr> wrote:

> cflength=1:??? [8,27,32,72,108,128,200,243,288,392,432,512,648,675,800,968,972]
> cflength=2:??? [200,800,1800,3200,3267,5000,7200,9800]
> cflength=3:??? [288,1152,2592,4608,7200]
> cflength=4:??? [6728]
> cflength=5:??? [9800]

OK, trying this again w/ the patch I applied yesterday:

for cflength:1 thru 5 do block ([foo : sublist(1 .. 10000, lambda([n],
integerp(cf(sqrt(n)))))], display (cflength, foo));

cflength = 1

foo = [200,1800,5000,9800]

cflength = 2

foo = [6728]

cflength = 3

foo = []

cflength = 4

foo = []

cflength = 5

foo = []


So I guess that's some improvement but there are still some anomalous
results.

Thanks for bringing up this topic. I haven't yet tried your other examples.

best

Robert Dodier