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
Maxim Sølund Kirsebom, Extreme Value Theory for Hurwitz Complex Continued Fractions, Entropy (2021) Vol. 23, No. 7, 840.
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/(16-1/(294-1/(3-1/(4-1/(5-1/(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/(z-op(-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
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