OFFSET
0,4
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..490
FORMULA
a(n) = Sum_{k=0..floor(n/3)} (n!/(k!*(n-3*k)!*3^k)) * a(k), with a(0)=1.
EXAMPLE
E.g.f. A(x) = exp( x + x^3/3 + x^9/3^4 + x^27/3^13 + x^81/3^40 + ...)
= 1 + 1*x + 1*x^2/2! + 3*x^3/3! + 9*x^4/4! + 21*x^5/5! + 81*x^6/6! + ...
MATHEMATICA
a[n_]:= a[n]= If[n==0, 1, Sum[n!*a[k]/(3^k*k!*(n-3*k)!), {k, 0, Floor[n/3]}] ];
Table[a[n], {n, 0, 25}] (* G. C. Greubel, Mar 07 2021 *)
PROG
(PARI) {a(n) = if(n==0, 1, sum(k=0, n\3, n!/(k!*(n-3*k)!*3^k)*a(k)))}
for(n=0, 30, print1(a(n), ", "))
(PARI) /* Defined by E.G.F.: */
{a(n) = n!*polcoeff( exp(sum(k=0, ceil(log(n+1)/log(3)), x^(3^k)/3^((3^k-1)/2))+x*O(x^n)), n, x)}
for(n=0, 30, print1(a(n), ", "))
(Sage)
@CachedFunction
def a(n):
f=factorial;
if n==0: return 1
else: return sum( f(n)*a(k)/(3^k*f(k)*f(n-3*k)) for k in (0..n/3))
[a(n) for n in (0..25)] # G. C. Greubel, Mar 07 2021
(Magma)
function a(n)
F:=Factorial;
if n eq 0 then return 1;
else return (&+[F(n)*a(j)/(3^j*F(j)*F(n-3*j)): j in [0..Floor(n/3)]]);
end if; return a; end function;
[a(n): n in [0..25]]; // G. C. Greubel, Mar 07 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, May 06 2006
STATUS
approved