OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..250
Eric Weisstein's World of Mathematics, Continued Fraction Constants
Eric Weisstein's World of Mathematics, Generalized Continued Fraction
FORMULA
The Aitken delta-squared process leaves the sequence S(n) = Sum_{k=1..n} (-1)^(k+1)/k! essentially unchanged: S(n+3) = (S(n)*S(n+2) - (S(n+1))^2)/(S(n) + S(n+2) - 2*S(n+1)).
Numerators of coefficients in expansion of (1 - exp(-x)) / (1 - x). - Ilya Gutkovskiy, May 24 2022
EXAMPLE
0, 1, 1/2, 2/3, 5/8, 19/30, 91/144, 177/280, 3641/5760, 28673/45360, 28319/44800, ...
MAPLE
b:= proc(n) b(n):=`if`(n<2, 1-n, (n-1)*(b(n-1)+b(n-2))) end:
a:= n-> numer((n!-b(n))/n!):
seq(a(n), n=0..30); # Alois P. Heinz, May 15 2013
MATHEMATICA
Table[Numerator[Sum[ -(-1)^k/k!, {k, n}]], {n, 0, 22}] (* Robert G. Wilson v *)
Table[Numerator[1 - Subfactorial[n]/n!], {n, 0, 23}] (* Jean-François Alcover, Feb 11 2014 *)
Join[{0}, Accumulate[Times@@@Partition[Riffle[1/Range[30]!, {1, -1}, {2, -1, 2}], 2]]//Numerator] (* Harvey P. Dale, Apr 18 2023 *)
PROG
(Python)
from math import factorial
from fractions import Fraction
def A103816(n): return sum(Fraction(1 if k&1 else -1, factorial(k)) for k in range(1, n+1)).numerator # Chai Wah Wu, Jul 31 2023
CROSSREFS
KEYWORD
nonn,frac,nice,easy
AUTHOR
N. J. A. Sloane, Apr 02 2005
EXTENSIONS
More terms from Robert G. Wilson v, Oct 13 2005
STATUS
approved