OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,4,-6,-3).
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
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
KEYWORD
nonn
AUTHOR
Paul Curtz, Mar 11 2008
EXTENSIONS
More terms from Emeric Deutsch, Mar 31 2008
STATUS
approved