cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A236438 a(n) = n*a(n-1) + (-1)^n for n>0, a(0)=2.

This page as a plain text file.
%I A236438 #19 Sep 08 2022 08:46:06
%S A236438 2,1,3,8,33,164,985,6894,55153,496376,4963761,54601370,655216441,
%T A236438 8517813732,119249392249,1788740883734,28619854139745,486537520375664,
%U A236438 8757675366761953,166395831968477106,3327916639369542121,69886249426760384540,1537497487388728459881
%N A236438 a(n) = n*a(n-1) + (-1)^n for n>0, a(0)=2.
%H A236438 Indranil Ghosh, <a href="/A236438/b236438.txt">Table of n, a(n) for n = 0..449</a>
%F A236438 E.g.f.: (1 + exp(-x)) / (1 - x).
%F A236438 a(n) = A001120(n) unless n=0.
%F A236438 a(n) = A000166(n) + n!.
%F A236438 0 = a(n) * (a(n+1) + a(n+2) - a(n+3)) + a(n+1) * (a(n+1) + 2*a(n+2) - a(n+3)) + a(n+2) * (a(n+2)) if n>=0.
%F A236438 a(n) = Gamma(n+1) + Gamma(n+1, -1)*exp(-1). - _Peter Luschny_, Feb 28 2017
%F A236438 D-finite with recurrence a(n) +(-n+1)*a(n-1) +(-n+1)*a(n-2)=0. - _R. J. Mathar_, Sep 24 2021
%e A236438 G.f. = 2 + x + 3*x^2 + 8*x^3 + 33*x^4 + 164*x^5 + 985*x^6 + 6894*x^7 + ...
%p A236438 a := n -> GAMMA(n+1) + GAMMA(n+1,-1)*exp(-1):
%p A236438 seq(simplify(a(n)), n=0..22); # _Peter Luschny_, Feb 28 2017
%t A236438 a[ n_] := If[ n < 0, 0, n! + Subfactorial[n]]
%t A236438 a[ n_] := If[ n < 1, 2 Boole[n == 0], n! + Round[ n! / E]]
%t A236438 a[ n_] := If[ n < 0, 0, n! + (-1)^n HypergeometricPFQ[ { -n, 1}, {}, 1]]
%t A236438 a[ n_] := If[ n<0, 0, n! SeriesCoefficient[ (1 + Exp[ -x]) / (1 - x), {x, 0, n}]]
%o A236438 (PARI) {a(n) = if( n<1, 2 * (n==0), n * a(n-1) + (-1)^n)}
%o A236438 (PARI) {a(n) = if( n<0, 0, n! * polcoeff( (1 + exp(-x + x * O(x^n))) / (1 - x), n))}
%o A236438 (Magma) m:=50; R<x>:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!((1+Exp(-x))/(1-x))); [Factorial(n-1)*b[n]: n in [1..m]]; // _G. C. Greubel_, Aug 07 2018
%Y A236438 Cf. A000166, A001120, A002467.
%K A236438 nonn
%O A236438 0,1
%A A236438 _Michael Somos_, Jan 25 2014