A089977 Expansion of 1/((1-2*x)*(1+x+2*x^2)).
1, 1, 1, 5, 9, 13, 33, 69, 121, 253, 529, 1013, 2025, 4141, 8193, 16293, 32857, 65629, 130801, 262229, 524745, 1047949, 2096865, 4195845, 8387641, 16775101, 33558481, 67109045, 134209449, 268443373, 536879553, 1073717349, 2147490841, 4295009053, 8589878449
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- D. Birmajer, J. B. Gil, and M. D. Weiner, On the Enumeration of Restricted Words over a Finite Alphabet, J. Int. Seq. 19 (2016) # 16.1.3, Example 9.
- Index entries for linear recurrences with constant coefficients, signature (1,0,4).
Programs
-
Maple
seq(add(binomial(n-2*k,k)*4^k,k=0..floor(n/3)),n=0..32); # Zerinvary Lajos, Apr 03 2007
-
Mathematica
Table[HypergeometricPFQ[{1/3-n/3,2/3-n/3,-n/3},{1/2-n/2,-n/2},-27],{n,0,32}] (* Peter Luschny, Feb 07 2015 *) CoefficientList[Series[1/((1 - 2*x)*(1 + x + 2*x^2)), {x,0,50}], x] (* G. C. Greubel, Apr 27 2017 *) LinearRecurrence[{1,0,4},{1,1,1},40] (* Harvey P. Dale, Sep 01 2021 *)
-
PARI
Vec(1/((1-2*x)*(1+x+2*x^2)) + O(x^50)) \\ Michel Marcus, Feb 07 2015
Formula
a(n) = Sum_{k=0..floor(n/2)} C(n-2*k, k)*4^k.
a(n) = 2^(n-1)+2^(n/2)*(cos((n+2)*arctan(sqrt(7)/7)+Pi*n/2)/4+5*sqrt(7)*sin((n+2)*arctan(sqrt(7)/7)+Pi*n/2)/28).
a(n) = Sum_{k=0..n} C(k, floor((n-k)/2))2^(n-k)*(1+(-1)^(n-k))/2. - Paul Barry, Jan 12 2006
a(n) = a(n-1) + 4*a(n-3) for n>=3, a(0)=1, a(1)=1, a(2)=1. - Michal Kaczmarczyk, Apr 24 2006
a(n) = 2^(n-1) + A110512(n)/2. - R. J. Mathar, Aug 23 2011
G.f.: Q(0)/2, where Q(k) = 1 + 1/(1 - x*(4*k+1 + 4*x^2)/( x*(4*k+3 + 4*x^2) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 08 2013
a(n) = hypergeom([1/3-n/3,2/3-n/3,-n/3],[1/2-n/2,-n/2],-27). - Peter Luschny, Feb 07 2015
Comments