A103816 Numerator of Sum_{k=1..n} (-1)^(k+1)/k!.
0, 1, 1, 2, 5, 19, 91, 177, 3641, 28673, 28319, 2523223, 27526069, 109339663, 4239014627, 59043418019, 26718637649, 14052333488521, 238063061452591, 158218865944829, 7358312808534631, 124213980448686521, 11277840764547411113, 67527236643922308689
Offset: 0
Examples
0, 1, 1/2, 2/3, 5/8, 19/30, 91/144, 177/280, 3641/5760, 28673/45360, 28319/44800, ...
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
Crossrefs
Cf. A053556 (denominators).
Programs
-
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 *)
-
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
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
Extensions
More terms from Robert G. Wilson v, Oct 13 2005
Comments