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 (6,-17,24,-16).
FORMULA
G.f.: (1-3*x+14*x^2-8*x^3)/(1-3*x+4*x^2)^2.
a(n) = 2^n*( (2n+7)*sin(2n*atan(1/sqrt(7)))/sqrt(7) - (2*n-1)*cos(2n*atan(1/sqrt(7)))).
MAPLE
seq(coeff(series((1-3*x+14*x^2-8*x^3)/(1-3*x+4*x^2)^2, x, n+1), x, n), n = 0..30); # G. C. Greubel, Nov 25 2019
MATHEMATICA
LinearRecurrence[{6, -17, 24, -16}, {1, 3, 15, 55}, 30] (* Harvey P. Dale, Jun 12 2017 *)
PROG
(PARI) my(x='x+O('x^30)); Vec((1-3*x+14*x^2-8*x^3)/(1-3*x+4*x^2)^2) \\ G. C. Greubel, Nov 25 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-3*x+14*x^2-8*x^3)/(1-3*x+4*x^2)^2 )); // G. C. Greubel, Nov 25 2019
(Sage)
def A176288_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1-3*x+14*x^2-8*x^3)/(1-3*x+4*x^2)^2 ).list()
A176288_list(30) # G. C. Greubel, Nov 25 2019
(GAP) a:=[1, 3, 15, 55];; for n in [5..30] do a[n]:=6*a[n-1]-17*a[n-2]+24*a[n-3] -16*a[n-4]; od; a; # G. C. Greubel, Nov 25 2019
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, Apr 14 2010
STATUS
approved