A191370 a(n) = 2*(1+(-1)^n)/3 + 2*A010892(n-1).
1, 2, 4, 2, 4, 8, 22, 44, 88, 170, 340, 680, 1366, 2732, 5464, 10922, 21844, 43688, 87382, 174764, 349528, 699050, 1398100, 2796200, 5592406, 11184812, 22369624, 44739242
Offset: 0
Links
- Muniru A Asiru, Table of n, a(n) for n = 0..3000
- Index entries for linear recurrences with constant coefficients, signature (2,0,-1,2).
Programs
-
Maple
A010892 := proc(n) op( 1+(n mod 6),[1,1,0,-1,-1,0]) ; end proc: A191370 := proc(n) 2^n/3+2*(-1)^n/3+2*A010892(n-1) ; end proc: seq(A191370(n),n=0..30) ; # R. J. Mathar, Jun 06 2011
-
Mathematica
LinearRecurrence[{2,0,-1,2},{1,2,4,2},30] (* Harvey P. Dale, Sep 06 2022 *)
Formula
a(n+3) = 3*2^n - a(n), n >= 0.
a(n+1) - 2*a(n) = -6*A131531(n+1).
a(n+6) = a(n) + 21*2^n.
a(n) = ((2^n + 2*(-1)^n)*2^n - 2*i*sqrt(3)*((1+i*sqrt(3))^n - (1-i*sqrt(3))^n))/(3*2^n), where i=sqrt(-1); a(n+1) = 2*(A001045(n) + A010892(n)). - Bruno Berselli, Jun 06 2011
G.f.: ( -1+5*x^3 ) / ( (2*x-1)*(1+x)*(x^2-x+1) ). - R. J. Mathar, Jun 06 2011
a(n) = 2*a(n-1) - a(n-3) + 2*a(n-4). - Paul Curtz, Jun 07 2011
Comments