OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..444
FORMULA
E.g.f.: exp(x*(1-x^2+x^3)/(1-x)).
Expression as a sum involving generalized Laguerre polynomials, in Mathematica notation: a(n)=n!*Sum[(-1)^k*LaguerreL[n - 3*k, -1, -1]/k!, {k, 0, Floor[n/3]}], n=0, 1....
a(n) ~ exp(-3/2+2*sqrt(n)-n)*n^(n-1/4)/sqrt(2). - Vaclav Kotesovec, Jun 22 2013
MAPLE
a:= proc(n) option remember; `if`(n=0, 1, add(
`if`(j=3, 0, a(n-j)*binomial(n-1, j-1)*j!), j=1..n))
end:
seq(a(n), n=0..30); # Alois P. Heinz, May 10 2016
MATHEMATICA
Range[0, 18]!*CoefficientList[ Series[ Exp[x*(1-x^2+x^3)/(1 - x)], {x, 0, 18}], x] (* Zerinvary Lajos, Mar 23 2007 *)
a[n_] := a[n] = If[n==0, 1, Sum[If[j==3, 0, a[n-j]*Binomial[n-1, j-1]*j!], {j, 1, n}]]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 11 2017, after Alois P. Heinz *)
PROG
(PARI) x='x+O('x^30); Vec(serlaplace(exp(x*(1-x^2+x^3)/(1-x)))) \\ G. C. Greubel, May 17 2018
(Magma) m:=25; R<x>:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!(Exp(x*(1-x^2+x^3)/(1-x)))); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, May 17 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Karol A. Penson, Oct 19 2005
STATUS
approved