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!)
A122972 a(1) = 1, a(2) = 2; for n>2, a(n+1) = a(n)*(n-1) + a(n-1)*n. 2
1, 2, 4, 14, 58, 302, 1858, 13262, 107698, 980942, 9905458, 109844942, 1327159858, 17353902542, 244180971058, 3678842132942, 59089527531058, 1007972756756942, 18199148360427058, 346736152866068942 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n+2) - a(n) = 3*(n-1)*(n-1)! = A052673(n).
LINKS
FORMULA
a(n) = 2*(-1)^n - 3*(-1)^n*Sum_{k=0..n-1} (-1)^k*k!. - Vaclav Kotesovec, Oct 28 2012
MATHEMATICA
RecurrenceTable[{a[1]==1, a[2]==2, a[n]==a[n-1](n-2)+a[n-2](n-1)}, a, {n, 20}] (* Harvey P. Dale, Nov 02 2011 *)
Table[2*(-1)^n-3*(-1)^n*Sum[(-1)^k*k!, {k, 0, n-1}], {n, 1, 20}] (* Vaclav Kotesovec, Oct 28 2012 *)
PROG
(Haskell)
a122972 n = a122972_list !! (n-1)
a122972_list = 1 : 2 : zipWith (+)
(zipWith (*) [2..] a122972_list) (zipWith (*) [1..] $ tail a122972_list)
-- Reinhard Zumkeller, Nov 15 2011
CROSSREFS
Sequence in context: A170939 A030952 A030861 * A030948 A030841 A030938
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Sep 21 2006
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 11:20 EDT 2024. Contains 371912 sequences. (Running on oeis4.)