%I #24 Jan 09 2016 11:49:01
%S 3,-4,2,5,-2,-7,2,9,-2,-11,2,13,-2,-15,2,17,-2,-19,2,21,-2,-23,2,25,
%T -2,-27,2,29,-2,-31,2,33,-2,-35,2,37,-2,-39,2,41,-2,-43,2,45,-2,-47,2,
%U 49,-2,-51,2,53,-2,-55,2,57,-2,-59,2,61,-2,-63,2,65,-2,-67,2,69,-2,-71,2,73,-2,-75,2,77,-2,-79,2,81,-2,-83,2,85,-2,-87,2
%N "Exact" continued fraction of e.
%C See comments in A133593. Just as for the usual continued fraction for e, the exact continued fraction also has a simple pattern.
%H Colin Barker, <a href="/A133570/b133570.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,-2,0,-1).
%F x(0) = e, a(n) = floor( |x(n)| + 0.5 ) * Sign(x(n)), x(n+1) = 1 / (x(n)-a(n)).
%F From _Colin Barker_, Sep 13 2013 and Jan 08 2016: (Start)
%F a(n) = 1/2*((2-i*2)*((-i)^n-i*i^n)+((-i)^n-i^n)*n)*(-1)*i for n>1.
%F a(n) = -2*a(n-2)-a(n-4) for n>5.
%F G.f.: -(x^5-5*x^4+3*x^3-8*x^2+4*x-3)/(x^2+1)^2.
%F (End)
%t $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 *)
%t Join[{3, -4}, LinearRecurrence[{0, -2, 0, -1}, {2, 5, -2, -7}, 100]] (* _Vincenzo Librandi_, Jan 09 2016 *)
%o (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
%Y Cf. A133593, A003417.
%K cofr,sign,easy
%O 0,1
%A Serhat Sevki Dincer (jfcgauss(AT)gmail.com), Dec 30 2007