OFFSET
0,4
COMMENTS
Equals row sums of triangle A118394.
LINKS
Robert Israel, Table of n, a(n) for n = 0..533
FORMULA
E.g.f.: 1 + x/(1+x)*(G(0) - 1) where G(k) = 1 + (1+x^2)/(k+1)/(1-x/(x+(1)/G(k+1) )), recursively defined continued fraction. - Sergei N. Gladkovskii, Feb 04 2013
a(n) ~ 3^(n/3-1/2) * n^(2*n/3) * exp((n/3)^(1/3)-2*n/3). - Vaclav Kotesovec, Jun 02 2013
E.g.f.: A(x) = exp(x+x^3) satisfies A' - (1+3*x^2)*A = 0. - Gheorghe Coserea, Aug 24 2015
a(n+1) = a(n) + 3*n*(n-1)*a(n-2). - Gheorghe Coserea, Aug 24 2015
a(n) = n! * Sum_{k=0..floor(n/3)} binomial(n-2*k,k)/(n-2*k)!. - Seiichi Manyama, Feb 25 2022
MAPLE
with(combstruct):seq(count(([S, {S=Set(Union(Z, Prod(Z, Z, Z)))}, labeled], size=n)), n=0..22); # Zerinvary Lajos, Mar 18 2008
MATHEMATICA
CoefficientList[Series[E^(x+x^3), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Jun 02 2013 *)
T[n_, k_] := n!/(k!(n-3k)!);
a[n_] := Sum[T[n, k], {k, 0, Floor[n/3]}];
a /@ Range[0, 24] (* Jean-François Alcover, Nov 04 2020 *)
PROG
(PARI) a(n)=n!*polcoeff(exp(x+x^3+x*O(x^n)), n)
(PARI)
N=33; x='x+O('x^N);
egf=exp(x+x^3);
Vec(serlaplace(egf))
/* Joerg Arndt, Sep 15 2012 */
(PARI) a(n) = n!*sum(k=0, n\3, binomial(n-2*k, k)/(n-2*k)!); \\ Seiichi Manyama, Feb 25 2022
(Magma) [n le 3 select 1 else Self(n-1) + 3*(n-2)*(n-3)*Self(n-3): n in [1..26]]; // Vincenzo Librandi, Aug 25 2015
(Sage)
def a(n):
if (n<3): return 1
else: return a(n-1) + 3*(n-1)*(n-2)*a(n-3)
[a(n) for n in (0..25)] # G. C. Greubel, Feb 18 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, May 07 2006
EXTENSIONS
Missing a(0)=1 prepended by Joerg Arndt, Sep 15 2012
STATUS
approved