OFFSET
0,1
COMMENTS
See comments in A133593. Just as for the usual continued fraction for e, the exact continued fraction also has a simple pattern.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,-2,0,-1).
FORMULA
x(0) = e, a(n) = floor( |x(n)| + 0.5 ) * Sign(x(n)), x(n+1) = 1 / (x(n)-a(n)).
From Colin Barker, Sep 13 2013 and Jan 08 2016: (Start)
a(n) = 1/2*((2-i*2)*((-i)^n-i*i^n)+((-i)^n-i^n)*n)*(-1)*i for n>1.
a(n) = -2*a(n-2)-a(n-4) for n>5.
G.f.: -(x^5-5*x^4+3*x^3-8*x^2+4*x-3)/(x^2+1)^2.
(End)
MATHEMATICA
$MaxExtraPrecision = Infinity; x[0] = E; 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 *)
Join[{3, -4}, LinearRecurrence[{0, -2, 0, -1}, {2, 5, -2, -7}, 100]] (* Vincenzo Librandi, Jan 09 2016 *)
PROG
(PARI) Vec(-(x^5-5*x^4+3*x^3-8*x^2+4*x-3)/(x^2+1)^2 + O(x^100)) \\ Colin Barker, Sep 13 2013
CROSSREFS
KEYWORD
cofr,sign,easy
AUTHOR
Serhat Sevki Dincer (jfcgauss(AT)gmail.com), Dec 30 2007
STATUS
approved