The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A105926 First differences of A000166. 2

%I #21 May 09 2023 08:32:29

%S -1,1,1,7,35,221,1589,12979,118663,1201465,13349609,161530271,

%T 2114578091,29780308117,448995414685,7215997736011,123153028027919,

%U 2224451568754289,42395429898611153,850263899633257015,17900292623858042419,394701452356069835341

%N First differences of A000166.

%H G. C. Greubel, <a href="/A105926/b105926.txt">Table of n, a(n) for n = 0..200</a>

%F a(n) = n*!n - (-1)^n, where !n = A000166(n) is subfactorial. - _Vladimir Reshetnikov_, Nov 03 2015

%F (2n + 1) a(n+2) = (2n^2 + 5n + 4) a(n+1) + (2n^2 + 5n + 3) a(n). E.g.f.: exp(-x)*(2*x-1)/(x-1)^2. - _Robert Israel_, Nov 03 2015

%p a:=n->sum((-1)^k * (n-k-1) * n!/k!, k=0..n): seq(a(n), n=0..20); # _Zerinvary Lajos_, Jun 27 2007

%p A000166:= gfun:-rectoproc({a(0)=1,a(1)=0,a(n) = (n-1)*(a(n-1)+a(n-2))},a(n),remember):

%p seq(A000166(n+1)-A000166(n),n=0..100); # _Robert Israel_, Nov 03 2015

%t Table[Subfactorial[n] - Subfactorial[n - 1], {n, 1, 22}] (* _Zerinvary Lajos_, Jul 09 2009 *)

%t Table[n Subfactorial[n] - (-1)^n, {n, 0, 20}] (* _Vladimir Reshetnikov_, Nov 01 2015 *)

%t Differences[Table[(-1)^n HypergeometricPFQ[{-n,1},{},1], {n,0,20}]] (* _Peter Luschny_, Nov 03 2015 *)

%Y Cf. A000166.

%K sign

%O 0,4

%A _N. J. A. Sloane_, Apr 27 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 09:56 EDT 2024. Contains 372588 sequences. (Running on oeis4.)