login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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*x-u*t| = 1.

Regarding DCF(e), after the initial (2,2), the strings (-1,-1,-1) and (1,1,1) alternate with odd-length 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 x-e, where x is the 20th convergent: for delayed CF, x-e = 5.4x10^-7; for classical CF, x-e = 6.1x10^-16; for accelerated CF, x-e = -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 * A201208 A006513 A105224

Adjacent sequences:  A228822 A228823 A228824 * A228826 A228827 A228828

KEYWORD

cofr,sign,easy

AUTHOR

Clark Kimberling, Sep 04 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified June 28 09:49 EDT 2017. Contains 288813 sequences.