[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A350855
a(0) = 1, a(n) = (n+1)*a(n-1) + (n-2).
0
1, 1, 3, 13, 67, 405, 2839, 22717, 204459, 2044597, 22490575, 269886909, 3508529827, 49119417589, 736791263847, 11788660221565, 200407223766619, 3607330027799157, 68539270528183999, 1370785410563679997, 28786493621837279955, 633302859680420159029, 14565965772649663657687
OFFSET
0,3
FORMULA
a(n) ~ (6-2e)*(n+1)!.
E.g.f.: (exp(x)*(4*x-x^2-5)+6)/(x-1)^2. - Alois P. Heinz, Jan 19 2022
EXAMPLE
a(1) = (1+1)*a(0) + (1-2) = 2-1 = 1.
a(2) = (2+1)*a(1) + (2-2) = 3.
MATHEMATICA
Nest[Append[#1, (#2 + 1) #1[[-1]] + (#2 - 2)] & @@ {#, Length@ #} &, {1}, 20] (* Michael De Vlieger, Jan 19 2022 *)
PROG
(PARI) a(n) = if (n, (n+1)*a(n-1) + (n-2), 1); \\ Michel Marcus, Jan 19 2022
(Python)
terms = [1]
for n in range(1, 20):
terms.append((n+1)*terms[-1]+n-2)
print(terms) # Gleb Ivanov, Jan 19 2022
CROSSREFS
Cf. A020543.
Sequence in context: A107592 A215257 A367919 * A295226 A028418 A180191
KEYWORD
nonn
AUTHOR
Amrit Awasthi, Jan 19 2022
STATUS
approved