OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Yasushi Ieno, A newly-generalized problem from a problem for the Mathematical Olympiad and the methods to solve it, arXiv:2012.12655 [math.GM], 2020. See p. 9.
FORMULA
a(n) = Sum_{k=0..[n/2]} 3^(n-2*k)/2^k * n!/((n-2*k)!*k!).
O.g.f.: 1/(1-3*x - x^2/(1-3*x - 2*x^2/(1-3*x - 3*x^2/(1-3*x - 4*x^2/(1-3*x -...))))), a continued fraction.
a(n) ~ n^(n/2)*exp(-n/2+3*sqrt(n)-9/4)/sqrt(2) * (1+15/(8*sqrt(n))). - Vaclav Kotesovec, May 23 2013
Recurrence: a(n) = 3*a(n-1) + (n-1)*a(n-2). - Vaclav Kotesovec, May 23 2013
EXAMPLE
E.g.f.: A(x) = 1 + 3*x + 10*x^2/2! + 36*x^3/3! + 138*x^4/4! + 558*x^5/5! +...
MATHEMATICA
CoefficientList[Series[Exp[3*x + x^2/2], {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, May 23 2013 *)
PROG
(PARI) {a(n)=n!*polcoeff(exp(3*x+x^2/2+x*O(x^n)), n)}
(PARI) {a(n)=sum(k=0, n\2, 3^(n-2*k)/2^k * n!/((n-2*k)!*k!))}
(PARI) /* O.g.f. as a continued fraction: */
{a(n)=local(CF=1+3*x+x*O(x^n)); for(k=1, n-1, CF=1/(1-3*x-(n-k)*x^2*CF)); polcoeff(CF, n)}
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Dec 25 2011
STATUS
approved