OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (6,-12,10,-6,12,-9).
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)
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