

A133593


"Exact" continued fraction for Pi.


7



3, 7, 16, 294, 3, 4, 5, 15, 3, 2, 2, 2, 2, 3, 85, 3, 2, 15, 3, 14, 5, 2, 6, 6, 100, 3, 2, 6, 3, 6, 2, 6, 9, 9, 3, 3, 8, 4, 2, 13, 3, 5, 2, 9, 2, 3, 8, 2, 5, 2, 2, 4, 3, 4, 4, 17, 162, 46, 24, 3, 3, 6, 3, 25, 4, 5, 4, 2, 10, 2, 5, 5, 3, 2, 9, 6, 2, 2, 27, 6, 2, 8, 2, 42, 3, 8, 3, 4, 2, 7, 2, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,1


COMMENTS

If we use "closest integer function" instead of the common practice of using Floor(x) when calculating continued fractions, we obtain a sequence of (not just positive but also occasionally negative) integers which approximate the original number better "per term" in the sequence. I call such continued fractions as "exact".
For instance 3+1/(7+1/16)=3.14159292, 3+1/(7+1/15)=3.141509434;
3+1/(7+1/(16+1/(294+1/3)))=3.141592653619, 3+1/(7+1/(15+1/(1+1/292)))=3.141592653012;
It is easy to see that as long as the fractional part of x(n) is in [0, 0.5) usual continued fraction and exact continued fraction agree in terms, but whenever fractional part of x(n) gets to be in (0.5, 1) then exact continued fraction gives better approximations more and more at each term.
Another example is that, exact continued fraction of golden ratio is 2,3,3,3,3,... which gives better approximations for any same amount of initial terms when compared to the usual 1,1,1,...
For x>2, ECF(1/x) = [0, ECF(x)].
ECF(sqrt(3))=2,4,4,4,4,...
ECF(1/sqrt(3))=1,2,3,4,4,4,4, ...
ECF(x) is just ECF(x) with signs reversed.
x(n)a(n) is in [ 0.5, 0.5 ], hence for n>0, a(n) >= 2.
Contribution from Giovanni Artico Oct 23 2013: (Start)
Comparing this expansion with standard simple continued fraction expansion (A001203) we can notice that:
 The convergents of this expansion are a subset of the standard one
 The difference between these convergents and the given number have no more alternate sign; e.g. for Pi the sequence of signs starts with
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
For each couple of equal signs in this sequence there is a missing convergent from the standard set of convergents (End)


LINKS

Table of n, a(n) for n=0..91.


FORMULA

x(0)=Pi, a(n) = floor(x(n) + 0.5 ) * sign(x(n)), x(n+1) = 1/(x(n)a(n)).


EXAMPLE

Pi=3+1/(7+1/(16+1/(294+1/(3+1/(4+1/(5+1/(15+1/(3+...))))))))
or Pi=3+1/(7+1/(161/(2941/(31/(41/(51/(15+1/(3+...)))))))) [Giovanni Artico , Oct 23 2013]


MAPLE

ECF := proc (n, q::posint)::list; local L, i, z; Digits := 10000; L := [round(n)]; z := n; for i from 2 to q do if z = op(1, L) then break end if; z := 1/(zop(1, L)); L := [op(L), round(z)] end do; return L end proc
ECF(Pi, 120) # Giovanni Artico , Oct 23 2013


MATHEMATICA

$MaxExtraPrecision = Infinity; x[0] = Pi; a[n_] := a[n] = Round[Abs[x[n]]]*Sign[x[n]]; x[n_] := 1/(x[n  1]  a[n  1]); Table[a[n], {n, 0, 120}] (* Clark Kimberling, Sep 04 2013 *)


PROG

High precision arithmetic with GMP 4.2.2, using 10k decimal digits of Pi which is obtained from the Internet.


CROSSREFS

Cf. A001203.
Sequence in context: A005312 A143817 A000963 * A191147 A227211 A271725
Adjacent sequences: A133590 A133591 A133592 * A133594 A133595 A133596


KEYWORD

cofr,sign


AUTHOR

Serhat Sevki Dincer (jfcgauss(AT)gmail.com), Dec 27 2007, Dec 30 2007, Jan 31 2008


EXTENSIONS

Added example and Maple program by Giovanni Artico, Oct 23 2013
Added comment by Giovanni Artico, Oct 23 2013


STATUS

approved



