[Date Index]
[Thread Index]
[Author Index]
Re: Is the iterated continued fraction from convergents for Pi/2 equal to 3/2?
*To*: mathgroup at smc.vnet.net
*Subject*: [mg119940] Re: Is the iterated continued fraction from convergents for Pi/2 equal to 3/2?
*From*: Daniel Lichtblau <danl at wolfram.com>
*Date*: Thu, 30 Jun 2011 20:40:13 -0400 (EDT)
On 06/20/2011 06:38 PM, Marvin Burns wrote:
> Some time ago I asked for help in defining and naming some iterated
> continued fraction from convergents. Links describing them are
> https://oeis.org/wiki/Convergents_constant and
> https://oeis.org/wiki/Table_of_convergents_constants.
>
> Do you think there is any error in the computations in my new notebook which
> is pasted to the bottom of this question?
It looks correct.
> It indicates the iterated continued fraction from convergents, or
> convergents constant (cc), for Pi/2 is 3/2.
> Can anyone help me prove that Mathematica is correct? The warning
> statement,"ContinuedFraction::incomp: Warning: ContinuedFraction terminated
> before 30 terms" makes me worry that there could be some error in the
> computation!
No issue there. This warning simply indicates that the input does not
provide as many convergenst as were requested. This can happen when
input is an exact rational with not too many convergents, or when it is
finite precision and fewer convergents than requested are required in
order to reach that precision.
> Similar experiments have indicated that the cc of 1<x<2 is the same for all
> x in that interval. I think this can be proven through methods found near
> the end of https://oeis.org/wiki/Table_of_convergents_constants.
>
>
> N[Pi/2,40]
>
> 1.570796326794896619231321691639751442099
>
> Convergents[%,30];
>
> N[FromContinuedFraction[%],40]
>
> 1.399437073110430452143756644740611223113
>
> Convergents[%,30];
>
> N[FromContinuedFraction[%],40]
>
> 1.490343396341538312190367098091859766573
>
> Convergents[%,30];
>
> N[FromContinuedFraction[%],40]
>
> 1.499506141544753996245023837037133508709
>
> Convergents[%,30];
>
> N[FromContinuedFraction[%],40]
>
> 1.499975256017086378103094352668241530238
>
> Convergents[%,30];
>
> N[FromContinuedFraction[%],40]
>
> 1.499998762644884859572966908242122674513
>
> Convergents[%,30];
>
> ContinuedFraction::incomp: Warning: ContinuedFraction terminated before 30
> terms. =EF=82=87
>
> N[FromContinuedFraction[%],40]
>
> 1.499999938132076351161240652364859960316
>
> Convergents[%,30];
>
> ContinuedFraction::incomp: Warning: ContinuedFraction terminated before 30
> terms. =EF=82=87
>
> N[FromContinuedFraction[%],40]
>
> 1.499999996906567523984731477342040062854
>
> Convergents[%,30];
>
> ContinuedFraction::incomp: Warning: ContinuedFraction terminated before 30
> terms. =EF=82=87
>
> N[FromContinuedFraction[%],40]
>
> 1.499999999845328929138608048920727157541
>
> Convergents[%,30];
>
> N[FromContinuedFraction[%],40]
>
> 1.499999999992275328240194538348680646578
>
> Convergents[%,30];
>
> N[FromContinuedFraction[%],40]
>
> 1.499999999999614321523514259986324767680
>
> Convergents[%,30];
>
> N[FromContinuedFraction[%],40]
>
> 1.499999999999978495630126428554334079425
>
> Convergents[%,30];
>
> N[FromContinuedFraction[%],40]
>
> 1.499999999999430490592898180226181726996
>
> Convergents[%,30];
>
> N[FromContinuedFraction[%],40]
>
> 1.499999999990876577511876363531307127180
>
> Convergents[%,30];
>
> N[FromContinuedFraction[%],40]
>
> 1.499999999999543690097706342514153778772
>
>
>
>
> l=Pi/2;
> Table[c=Convergents[l,500];l=FromContinuedFraction[c],{a,200}];N[l,300]
>
>
>
> 1.499999999999999999999999999999999999999999999999999999999999999999999999999999
> 99999999999999999999999999999999999999999999999999999999999999999999999999999999
> 99999999999999999999999999999999999999999999999999999999999999999999999999999999
> 9999999999999999999997535967131264972798688959975537466275259
3/2 is certainly a plausible result. If the convergents after the first
(which is 1) are all close to equal then we get an equation like
x == 1 + 1/(x+1/(x+...
After a bit of algebra we have the equation below.
In[357]:= Solve[x == 1/(x - 1) - (x - 1), x]
Out[357]= {{x -> 0}, {x -> 3/2}}
Why we get convergence of the convergents to begin with is something I
do not know.
We seem get similar convergences for cases where the integer part is not
1, but they do not go to the value predicted by the equation that would
correspond to the one above. I believe this is because the convergents
differ in the first few terms before they stabilize. The net effect is
to converge to something near to the value predicted by Solve, but not
at that value in any sharp sense.
This is not unexpected, really. The other cases I tried (initial integer
part of 0, 2, 3, or 4) all give irrational quadratic algebraics for the
result. So there is no chance that the second convergent can actually
equal the eventual approximate value.
Getting back to the case where initial convergent is 1. Some
experimenting indicates one can start with some random set of initial
values for the convergents (so long as the initial one is 1) and get
approximately 3/2 after a number of iterations.
In[366]:= c = Prepend[RandomInteger[{1, 6}, 100], 1];
l = FromContinuedFraction[c];
Table[c = Convergents[l, 80]; l = FromContinuedFraction[c], {a, 50}];
N[l, 100]
Out[369]= \
1.49999999999998988194185703527090233895376590202094162891692529645926\
1779669830127452950234895277752
Here is an anomaly I discovered by accident.
In[376]:= c = Prepend[RandomInteger[{1, 6}, 100], 1];
l = FromContinuedFraction[c];
Table[c = Convergents[l, 40]; l = FromContinuedFraction[c], {a, 40}];
N[l, 100]
Out[379]= \
1.40000000000000000000000130923654456919438413980253519511793176738815\
1135612555255830993904672324716
If I change the number of iterations from 40 to 39 or 41, I get a result
much closer to 3/2. At 39 it agrees to a few dozen decimal places. At 41
it agrees to (only) 3 places. The reason we get around 1.4 at 40
iterations has to do with the second convergent (second element of c)
being 2 and the ones thereafter around 3/2, but why that happens is a
mystery to me. Also if we request fewer or more convergents we again get
results of around 3/2. The only clue I can provide is that the 1.4
result seems to happen when number of convergents and number of
iterations are both even. But even then it seems only to arise in a few
of the random combinations of convergents/iterations that I tried (most
commonly when the two are equal but even then not by any means in all
such cases). If I drop the max in the initial segment to 4 I no longer
see this behavior, at least for the values I tried.
This is quite an interesting iteration, I'll give it that.
Daniel Lichtblau
Wolfram Research
Prev by Date:
**Re: OpenCL**
Next by Date:
**Re: Assigning part of indexed object**
Previous by thread:
**Is the iterated continued fraction from convergents for Pi/2 equal to 3/2?**
Next by thread:
**getting empty lines when copying as MathML**
| |