

A228825


Delayed continued fraction of e.


3



2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,1


COMMENTS

An algorithm for the (usual) continued fraction of r > 0 follows: x(0) = r, a(n) = floor(x(n)), x(n+1) = 1/(x(n)  a(n)).
The accelerated continued fraction uses "round" instead of "floor" (cf. A133593, A133570, A228667), where round(x) is the integer nearest x.
The delayed continued fraction (DCF) uses "second nearest integer", so that all the terms are in {2, 1, 1, 2}. If s/t and u/v are consecutive convergents of a DCF, then s*xu*t = 1.
Regarding DCF(e), after the initial (2,2), the strings (1,1,1) and (1,1,1) alternate with oddlength strings of the forms (2,2,...,2) and (2,2,...,2). The string lengths form the sequence 2,3,3,3,5,3,7,3,9,3,11,3,13,3,...
Comparison of convergence rates is indicated by the following approximate values of xe, where x is the 20th convergent: for delayed CF, xe = 5.4x10^7; for classical CF, xe = 6.1x10^16; for accelerated CF, xe = 6.6x10^27. The convergents for accelerated CF are a proper subset of those for classical CF, which are a proper subset of those for delayed CF (which are sampled in Example).


LINKS

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


EXAMPLE

Convergents: 2, 5/2, 3, 8/3, 11/4, 30/11, 49/18, 68/25, 19/7, 87/32, 106/39, 299/110, 492/181,...


MATHEMATICA

$MaxExtraPrecision = Infinity; x[0] = E; s[x_] := s[x] = If[FractionalPart[x] < 1/2, Ceiling[x], Floor[x]]; a[n_] := a[n] = s[Abs[x[n]]]*Sign[x[n]]; x[n_] := 1/(x[n  1]  a[n  1]); t = Table[a[n], {n, 0, 100}]


CROSSREFS

Cf. A133570, A228826
Sequence in context: A025451 A184257 A275656 * A324381 A201208 A006513
Adjacent sequences: A228822 A228823 A228824 * A228826 A228827 A228828


KEYWORD

cofr,sign,easy


AUTHOR

Clark Kimberling, Sep 04 2013


STATUS

approved



