login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A094717
a(n) = n! * Sum_{i+2j+3k=n} 1/(i!*(2j)!*(3k)!).
3
1, 1, 2, 5, 12, 36, 113, 351, 1080, 3281, 9882, 29646, 88817, 266085, 797526, 2391485, 7173360, 21520080, 64563521, 193700403, 581120892, 1743392201, 5230206126, 15690618378, 47071766561, 141215033961, 423644570442, 1270932914165, 3812797945332, 11438393835996
OFFSET
0,3
FORMULA
Limit_{n->oo} a(n)/3^n = 1/6.
E.g.f.: exp(z)*cosh(z)*(exp(z) + 2*exp(-z/2)*cos(z*sqrt(3/4)))/3. - Peter Luschny, Jul 11 2012
G.f.: (1-5*x+8*x^2-5*x^3+2*x^4-2*x^5)/((1-x)*(1-3*x)*(1+x+x^2)*(1-3*x+3*x^2)). - Colin Barker, Dec 24 2012
From G. C. Greubel, Jul 14 2023: (Start)
a(n) = (1/6)*(1 + 3^n + 2*A049347(n) + A049347(n-1) + 2*A057083(n) - 3*A057083(n-1)).
a(n) = (1/6)*(1 + 3^n + A099837(n+3) + A057682(n+3)). (End)
MAPLE
A094717_list := proc(n) local i; exp(z)*cosh(z)*(exp(z)+2*exp(-z/2)* cos(z*sqrt(3/4)))/3; series(%, z, n+2); seq(simplify(i!*coeff(%, z, i)), i=0..n) end: A094717_list(27); # Peter Luschny, Jul 11 2012
MATHEMATICA
a[n_]:= n! Sum[Boole[i +2j +3k ==n]/(i! (2j)! (3k)!), {i, 0, n}, {j, 0, n}, {k, 0, n}]; Table[a[n], {n, 0, 27}] (* Jean-François Alcover, Jul 06 2019 *)
LinearRecurrence[{6, -12, 10, -6, 12, -9}, {1, 1, 2, 5, 12, 36}, 40] (* G. C. Greubel, Jul 14 2023 *)
PROG
(PARI) a(n)=sum(i=0, n, sum(j=0, n, sum(k=0, n, if(n-i-2*j-3*k, 0, n!/(i)!/(2*j)!/(3*k)!))))
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-5*x+8*x^2-5*x^3+2*x^4-2*x^5)/((1-x)*(1-3*x)*(1+x+x^2)*(1-3*x+3*x^2)) )); // G. C. Greubel, Jul 14 2023
(SageMath)
def A094717_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1-5*x+8*x^2-5*x^3+2*x^4-2*x^5)/((1-x)*(1-3*x)*(1+x+x^2)*(1-3*x+3*x^2)) ).list()
A094717_list(40) # G. C. Greubel, Jul 14 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, May 23 2004
STATUS
approved