A157241 Expansion of x / ((1-x)*(4*x^2-2*x+1)).
0, 1, 3, 3, -5, -21, -21, 43, 171, 171, -341, -1365, -1365, 2731, 10923, 10923, -21845, -87381, -87381, 174763, 699051, 699051, -1398101, -5592405, -5592405, 11184811, 44739243, 44739243, -89478485, -357913941
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,-6,4).
Programs
-
Mathematica
CoefficientList[Series[x/((1-x)(4x^2-2x+1)),{x,0,40}],x] (* or *) LinearRecurrence[{3,-6,4},{0,1,3},40] (* Harvey P. Dale, Oct 27 2013 *) Table[1/9 (3 + (-1)^Floor[1/3 (-2 + n)] 2^(4 + 3 Floor[1/3 (-2 + n)]) + (-1)^Floor[1/3 (-1 + n)] 2^(3 + 3 Floor[1/3 (-1 + n)])), {n, 0, 500}] (* John M. Campbell, Dec 23 2016 *)
-
PARI
concat(0, Vec(x / ((1 - x)*(1 - 2*x + 4*x^2)) + O(x^40))) \\ Colin Barker, May 22 2019
Formula
a(n+1) - a(n) = A088138(n+1).
a(n+1) = Sum_{k=0..n} A120987(n,k)*(-1)^(n-k). - Philippe Deléham, Oct 25 2011
G.f.: 2*x-2*x/(G(0) + 1) where G(k)= 1 + 2*(2*k+3)*x/(2*k+1 - 2*x*(k+2)*(2*k+1)/(2*x*(k+2) + (k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Nov 23 2012
a(n) = 1/9*(3 + (-1)^floor((n-2)/3)*2^(4+3*floor((n-2)/3)) + (-1)^floor((n-1)/3)*2^(3+3*floor((n-1)/3))). - John M. Campbell, Dec 23 2016
From Colin Barker, May 22 2019: (Start)
a(n) = (2 - (1+i*sqrt(3))^(1+n) + i*(1-i*sqrt(3))^n*(i+sqrt(3))) / 6 where i=sqrt(-1).
a(n) = 3*a(n-1) - 6*a(n-2) + 4*a(n-3) for n>2.
(End)
Comments