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!)
A110149 a(0) = 1, a(1) = 3; for n>1, a(n) = n*a(n-1) + (-1)^n. 2
1, 3, 7, 20, 81, 404, 2425, 16974, 135793, 1222136, 12221361, 134434970, 1613219641, 20971855332, 293605974649, 4404089619734, 70465433915745, 1197912376567664, 21562422778217953, 409686032786141106, 8193720655722822121, 172068133770179264540 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

A000166, A001120 and A110043 have a similar recurrence.

a(n) = (n-1)*(a(n-1)+a(n-2)), n>2. - Gary Detlefs, Apr 11 2010

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..450

FORMULA

a(n) = A110043(n) + n! = A001120(n) + 2*n! = A000166(n) + 3*n! for n>0.

a(n) = 3*n! + floor((n!+1)/e) for n>0. - Gary Detlefs, Apr 11 2010

E.g.f.: (3*exp(x)*x+1)*exp(-x)/(1-x). - Alois P. Heinz, May 07 2020

MAPLE

a:= proc(n) option remember;

`if`(n<2, 2*n+1, n*a(n-1)+(-1)^n)

end:

seq(a(n), n=0..23); # Alois P. Heinz, May 07 2020

MATHEMATICA

RecurrenceTable[{a[1]==3, a[n]==n a[n-1]+(-1)^n}, a, {n, 20}] (* Harvey P. Dale, Nov 21 2011 *)

CROSSREFS

Column k=3 of A334715.

Sequence in context: A071688 A232687 A211602 * A024331 A007174 A091184

Adjacent sequences: A110146 A110147 A110148 * A110150 A110151 A110152

KEYWORD

nonn,easy

AUTHOR

Philippe Deléham, Sep 04 2005

EXTENSIONS

a(0)=1 prepended 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 March 28 03:48 EDT 2023. Contains 361577 sequences. (Running on oeis4.)