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 (10,-20).
FORMULA
G.f.: (1-2*x)/(1-10*x+20*x^2).
a(n) = ( (5 + 3*sqrt(5))*(5 + sqrt(5))^n + (5 - 3*sqrt(5))*(5 - sqrt(5))^n)/10.
a(n) = 2^n*A039717(n).
a(2*n) = 4^n*5^n*Fibonacci(2*n+2), a(2*n+1) = 2^(2*n+1)*5^n*Lucas(2*n+3). - G. C. Greubel, Dec 27 2019
MAPLE
seq(coeff(series((1-2*x)/(1-10*x+20*x^2), x, n+1), x, n), n = 0..30); # G. C. Greubel, Dec 27 2019
MATHEMATICA
Table[If[EvenQ[n], 2^n*5^(n/2)*Fibonacci[n+2], 2^n*5^((n-1)/2)*LucasL[n+2]], {n, 0, 30}] (* G. C. Greubel, Dec 27 2019 *)
PROG
(PARI) my(x='x+O('x^30)); Vec((1-2*x)/(1-10*x+20*x^2)) \\ G. C. Greubel, Dec 27 2019
(Magma) I:=[1, 8]; [n le 2 select I[n] else 10*(Self(n-1) - 2*Self(n-2)): n in [1..30]]; // G. C. Greubel, Dec 27 2019
(Sage)
def A093132_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1-2*x)/(1-10*x+20*x^2) ).list()
A093132_list(30) # G. C. Greubel, Dec 27 2019
(GAP) a:=[1, 8];; for n in [2..30] do a[n]:=10*(a[n-1]-2*a[n-2]); od; a; # G. C. Greubel, Dec 27 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Mar 23 2004
STATUS
approved