

A133593


"Exact" continued fraction for Pi.


8



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

Terms were obtained using high precision arithmetic with GMP 4.2.2, using 10000 decimal digits of Pi obtained from the Internet.
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 will refer to 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), the usual continued fraction and exact continued fraction agree in terms, but whenever the fractional part of x(n) gets to be in (0.5, 1) then the exact continued fraction gives better approximations more and more at each term.
Another example is that the exact continued fraction of the golden ratio is 2,3,3,3,3,... which gives a better approximation at any number of initial terms than does the usual 1,1,1,... at the same number of initial terms.
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.
From Giovanni Artico, Oct 23 2013: (Start)
Comparing this expansion with the standard simple continued fraction expansion (A001203) we can notice that:
 the convergents of this expansion are a subset of those of the standard one;
 the differences between these convergents and the given number no longer have strictly alternating signs; 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 term in this sequence of signs that is equal to its successor, 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)), where 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 *)


CROSSREFS

Cf. A001203.
Sequence in context: A143817 A297210 A000963 * A297154 A305348 A191147
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

Edited by Jon E. Schoenfield, Nov 23 2016


STATUS

approved



