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