OFFSET
0,6
COMMENTS
Average of binomial and inverse binomial transform of {1, 0, 0, 1, 0, 0, 1, ...}. - Paul Barry, Jan 04 2005
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
Limit_{n --> oo} a(n)/2^n = 1/6.
G.f.: (1-2*x^2-x^3+x^4-x^5)/((1-2*x)*(1-x+x^2)*(1+3*x+3*x^2)). - Vladeta Jovovic, May 23 2004
a(n) = (1/3)*Sum_{k=0..floor(n/2)} C(n, 2*k)*(2*cos(2*Pi*(n-2*k)/3) + 1). - Paul Barry, Jan 04 2005 [corrected by Jason Yuen, Aug 28 2024]
E.g.f.: (exp(z) + 2*exp(-z/2)*cos(z*sqrt(3/4)))*cosh(z)/3. - Peter Luschny, Jul 10 2012
a(n) = (1/6)*([n=0] + 2^n + 2*A010892(n) - A010892(n-1) + 2*A000748(n) + 3*A000748(n-1)). - G. C. Greubel, Feb 13 2023
MAPLE
A094715_list := proc(n) local i; (exp(z)+2*exp(-z/2)*cos(z*sqrt(3/4)))*cosh(z)/3; series(%, z, n+2): seq(i!*coeff(%, z, i), i=0..n) end: A094715_list(34); # Peter Luschny, Jul 10 2012
MATHEMATICA
Table[(1/6)*(Boole[n==0] +2^n +2*ChebyshevU[n, 1/2] -ChebyshevU[n-1, 1/2] +2*3^(n/2)*ChebyshevU[n, -Sqrt[3]/2] +3^((n+1)/2)*ChebyshevU[n- 1, -Sqrt[3]/2]), {n, 0, 50}] (* G. C. Greubel, Feb 13 2023 *)
PROG
(PARI) a(n)=sum(i=0, n, sum(j=0, n, if(n-2*i-3*j, 0, n!/(2*i)!/(3*j)!)))
(Magma) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1-2*x^2-x^3+x^4-x^5)/((1-2*x)*(1-x+x^2)*(1+3*x+3*x^2)) )); // G. C. Greubel, Feb 13 2023
(SageMath)
def A094715_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1-2*x^2-x^3+x^4-x^5)/((1-2*x)*(1-x+x^2)*(1+3*x+3*x^2)) ).list()
A094715_list(50) # G. C. Greubel, Feb 13 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, May 23 2004
STATUS
approved