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 (-1,4).
FORMULA
a(n) = (-1)^n * A026597(n).
a(n) = Sum_{k=0..n} (-2)^(n-k) * A055830(n,k).
G.f.: (1-x)/(1+x-4*x^2).
a(n) = (-2*i)^n*( ChebyshevU(n, -i/4) - (i/2)*ChebyshevU(n-1, -i/4) ). - G. C. Greubel, Dec 23 2021
E.g.f.: exp(-x/2)*(17*cosh(sqrt(17)*x/2) - 3*sqrt(17)*sinh(sqrt(17)*x/2))/17. - Stefano Spezia, Apr 03 2023
MAPLE
seq(coeff(series((1-x)/(1+x-4*x^2), x, n+1), x, n), n = 0..30); # G. C. Greubel, Oct 02 2019
MATHEMATICA
LinearRecurrence[{-1, 4}, {1, -2}, 30] (* G. C. Greubel, Oct 02 2019 *)
PROG
(PARI) my(x='x+O('x^30)); Vec((1-x)/(1+x-4*x^2)) \\ G. C. Greubel, Oct 02 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)/(1+x-4*x^2) )); // G. C. Greubel, Oct 02 2019
(Sage)
def A122112_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1-x)/(1+x-4*x^2)).list()
A122112_list(30) # G. C. Greubel, Oct 02 2019
(GAP) a:=[1, -2];; for n in [3..30] do a[n]:=-a[n-1]+4*a[n-2]; od; a; # G. C. Greubel, Oct 02 2019
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Philippe Deléham, Oct 18 2006
EXTENSIONS
Corrected by T. D. Noe, Nov 07 2006
STATUS
approved