OFFSET
1,2
LINKS
Jonathan Beagley and Lara Pudwell, Colorful Tilings and Permutations, Journal of Integer Sequences, Vol. 24 (2021), Article 21.10.4.
FORMULA
a(n) = n * Sum_{k=1..n} n!/k!.
a(n) = n * A002627(n).
From Alois P. Heinz, Jun 28 2021: (Start)
E.g.f.: (exp(x)-x)/(x-1)^2 - exp(x).
a(n) = A193657(n) - 1. (End)
D-finite with recurrence a(n) +(-n-2)*a(n-1) +(n-1)*a(n-2) -2 =0. - R. J. Mathar, Jan 11 2024
MAPLE
a:= proc(n) a(n):= `if`(n=1, 1, a(n-1)*n^2/(n-1)+n) end:
seq(a(n), n=1..21); # Alois P. Heinz, Jun 28 2021
MATHEMATICA
With[{r = Range[21]}, r*Rest@ FoldList[Times @@ {##} + 1 &, 0, r]] (* Michael De Vlieger, Jun 28 2021 *)
PROG
(PARI) a(n) = n*sum(k=1, n, n!/k!); \\ Michel Marcus, Jun 29 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Lara Pudwell, Jun 28 2021
STATUS
approved