login
A122112
a(n) = 4*a(n-2) - a(n-1), with a(0)=1, a(1)=-2.
1
1, -2, 6, -14, 38, -94, 246, -622, 1606, -4094, 10518, -26894, 68966, -176542, 452406, -1158574, 2968198, -7602494, 19475286, -49885262, 127786406, -327327454, 838473078, -2147782894, 5501675206, -14092806782, 36099507606, -92470734734
OFFSET
0,2
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
Sequence in context: A263758 A100067 A026597 * A190788 A168259 A275208
KEYWORD
sign,easy
AUTHOR
Philippe Deléham, Oct 18 2006
EXTENSIONS
Corrected by T. D. Noe, Nov 07 2006
STATUS
approved