OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..500
FORMULA
E.g.f.: exp(x^2*(x^4+2*x+3)/6).
D-finite with recurrence a(n) +(-n+1)*a(n-2) -(n-1)*(n-2)*a(n-3) -(n-5)*(n-1)*(n-2)*(n-3)*(n-4)*a(n-6)=0. - R. J. Mathar, Jul 04 2023
EXAMPLE
a(4) = 3: 2143, 3412, 4321.
a(5) = 20: 21453, 21534, 23154, 24513, 25431, 31254, 34152, 34521, 35124, 35412, 41523, 43251, 43512, 45132, 45213, 51432, 53214, 53421, 54123, 54231.
MAPLE
a:= proc(n) option remember; `if`(n<0, 0, `if`(n=0, 1,
add(mul(n-i, i=1..j-1)*a(n-j), j=[2, 3, 6])))
end:
seq(a(n), n=0..30);
MATHEMATICA
a[n_] := a[n] = If[n < 0, 0, If[n == 0, 1, Sum[Product[n - i, {i, 1, j - 1}]*a[n - j], {j, {2, 3, 6}}]]];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jun 10 2018, from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Aug 14 2015
STATUS
approved