login
A137255
a(n) = 2*a(n-1) + 4*a(n-2) - 6*a(n-3) - 3*a(n-4) for n > 3, with a(0)=1, a(1)=2, a(2)=4, a(3)=8.
2
1, 2, 4, 8, 17, 36, 80, 178, 409, 942, 2212, 5204, 12377, 29472, 70592, 169198, 406801, 978426, 2357092, 5679488, 13696385, 33032892, 79703120, 192321034, 464168041, 1120302822, 2704242244, 6527724428, 15758096777, 38040729336, 91834772480
OFFSET
0,2
FORMULA
a(n) = (3/8)*3^(n/2)*(1 + (-1)^n) + (5/24)*3^((n+1)/2)*(1 - (-1)^n) + (1/8)*(1+sqrt(2))^(n+1) + (1/8)*(1-sqrt(2))^(n+1). - Emeric Deutsch, Mar 31 2008
G.f.: (1 - 4*x^2 - 2*x^3)/(( 1 -3*x^2) *(1 -2*x -x^2)). - Harvey P. Dale, May 03 2018
4*a(n) = A078057(n) + A083658(n+2). - R. J. Mathar, Oct 03 2021
MAPLE
a:=proc(n) options operator, arrow: expand((3/8)*3^((1/2)*n)*(1+(-1)^n)+(5/24)*3^((1/2)*n+1/2)*(1-(-1)^n)+(1/8)*(1+sqrt(2))^(n+1)+(1/8)*(1-sqrt(2))^(n+1)) end proc: seq(a(n), n=0..30); # Emeric Deutsch, Mar 31 2008
MATHEMATICA
LinearRecurrence[{2, 4, -6, -3}, {1, 2, 4, 8}, 40] (* or *) CoefficientList[ Series[ (1-4 x^2-2 x^3)/(1-2 x-4 x^2+6 x^3+3 x^4), {x, 0, 40}], x] (* Harvey P. Dale, May 03 2018 *)
PROG
(Magma)
R<x>:=PowerSeriesRing(Integers(), 40);
Coefficients(R!( (1-4*x^2-2*x^3)/(1-2*x-4*x^2+6*x^3+3*x^4) )); // G. C. Greubel, Apr 11 2021
(Sage)
def A137255_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1-4*x^2-2*x^3)/(1-2*x-4*x^2+6*x^3+3*x^4) ).list()
A137255_list(40) # G. C. Greubel, Apr 11 2021
CROSSREFS
Sequence in context: A002955 A202844 A093951 * A247298 A325928 A076892
KEYWORD
nonn
AUTHOR
Paul Curtz, Mar 11 2008
EXTENSIONS
More terms from Emeric Deutsch, Mar 31 2008
STATUS
approved