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!)
A110043 a(0) = 1, a(1) = 2; for n>1, a(n) = n*a(n-1) + (-1)^n. 3
1, 2, 5, 14, 57, 284, 1705, 11934, 95473, 859256, 8592561, 94518170, 1134218041, 14744834532, 206427683449, 3096415251734, 49542644027745, 842224948471664, 15160049072489953, 288040932377309106, 5760818647546182121, 120977191598469824540, 2661498215166336139881 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
A000166 and A001120 have a similar recurrence.
LINKS
FORMULA
a(n) = A001120(n) + n! = A000166(n) + 2*n! for n>0.
a(n) = (n-1)*(a(n-1)+a(n-2)), n>2. - Gary Detlefs, Apr 11 2010
a(n) = 2*n! + floor((n!+1)/e) for n>0. - Gary Detlefs, Apr 11 2010
E.g.f.: (2*exp(x)*x+1)*exp(-x)/(1-x). - Alois P. Heinz, May 07 2020
MAPLE
a:= proc(n) option remember;
`if`(n<2, n+1, n*a(n-1)+(-1)^n)
end:
seq(a(n), n=0..23); # Alois P. Heinz, May 07 2020
MATHEMATICA
a[n_] := Subfactorial[n] + 2 Boole[n > 0] n!;
Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Mar 18 2022 *)
CROSSREFS
Column k=2 of A334715.
Sequence in context: A047042 A174795 A243551 * A006847 A008286 A049082
KEYWORD
nonn,easy
AUTHOR
Philippe Deléham, Sep 04 2005
EXTENSIONS
a(0)=1 prepended and two terms corrected by Alois P. Heinz, May 07 2020
STATUS
approved

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 April 23 05:35 EDT 2024. Contains 371906 sequences. (Running on oeis4.)