OFFSET
0,2
COMMENTS
e^(1/5) is a transcendental number.
In general, the ordinary generating function for the continued fraction expansion of e^(1/k), with k = 1, 2, 3..., is (1 + (k - 1)*x + x^2 - (k + 1)*x^3 + 7*x^4 - x^5)/(1 - x^3)^2.
LINKS
Eric Weisstein's World of Mathematics, e Continued Fraction
Index entries for linear recurrences with constant coefficients, signature (0,0,2,0,0,-1).
FORMULA
G.f.: (1 + 4*x + x^2 - x^3 + 6*x^4 - x^5)/(1 - x^3)^2.
a(n) = 1 + (3 + 10*floor(n/3))*(1 - (n-1)^2 mod 3). [Bruno Berselli, Feb 04 2016]
EXAMPLE
e^(1/5) = 1 + 1/(4 + 1/(1 + 1/(1 + 1/(14 + 1/(1 + 1/...))))).
MATHEMATICA
ContinuedFraction[Exp[1/5], 82]
LinearRecurrence[{0, 0, 2, 0, 0, -1}, {1, 4, 1, 1, 14, 1}, 82]
CoefficientList[Series[(1 + 4 x + x^2 - x^3 + 6 x^4 - x^5) / (x^3 - 1)^2, {x, 0, 70}], x] (* Vincenzo Librandi, Jan 13 2016 *)
Table[1 + (3 + 10 Floor[n/3]) (1 - Mod[(n - 1)^2, 3]), {n, 0, 90}] (* Bruno Berselli, Feb 04 2016 *)
PROG
(Magma) [1+(3+10*Floor(n/3))*(1-(n-1)^2 mod 3): n in [0..90]]; // Bruno Berselli, Feb 04 2016
CROSSREFS
KEYWORD
nonn,cofr,easy
AUTHOR
Ilya Gutkovskiy, Jan 13 2016
EXTENSIONS
Edited by Bruno Berselli, Feb 04 2016
STATUS
approved
