MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Continued fraction problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg17039] Continued fraction problem
  • From: "Alan W.Hopper" <awhopper at hermes.net.au>
  • Date: Wed, 14 Apr 1999 02:11:53 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

 A quite artificial but nevertheless interesting construction 
in recreational maths is the Champernowne Constant, defined 
in Eric Weisstein's Concise Encyc. of Math.,
as the decimal 0.1234567891011... , obtained by concatenating 
the positive integers.

The continued fraction expansion of this  number is stated to
be ;  (0,8,9,1,149083,1,1,1,4,1,1,1,3,4,1,1,1,15, a 166 digit #,...,
(position 41)a 2504 digit #,...,(position 163)a 33102 digit #,...

And using this code for the continued fraction period in list form ,

In[1]:= cf[x_Real, n_]:=Module[{ip, fp=x, result = {}},
	Do[ip = Floor[fp];
			AppendTo[result, ip];
			fp = 1/(fp-ip), {n}];
		result];		

In[2]:= cf[0.12345678910111213141516171819202122,20]

Out[3]= 
 (Error messages detailing Indeterminate, 
Infinite expressions and ComplexInfinity.)

{0,8,9,1,149083,1,1,1,4,1,1,1,3,4,1,1,1,15,1787142709274,
ComplexInfinity}


 All correct up to where the 166 digit term should appear.
(Inserting ,  N[....., 200] in the code does not help).

The result above is better however than with ;

 <<NumberTheory`ContinuedFractions`

ContinuedFraction[0.123456789101112131415161718192021, 20]

which gives 150571 as the fifth term.


I suppose that rounding errors and inadequate precision are coming
into play with this situation as it is now.

So I wonder if anyone knows a workable method of obtaining the correct
continued fraction period of a difficult case like the Champernowne const.
 with Mathematica, say up to that enormous 163 rd term, if it is at all
feasible?


Alan Hopper
awhopper at hermes.net.au


  • Prev by Date: Re: shading in area
  • Next by Date: RE: SetDirectory Problems
  • Previous by thread: Re: List of function-heads
  • Next by thread: Re: Continued fraction problem