OFFSET
0,1
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
A. F. Horadam, Pell Identities, Fib. Quart., Vol. 9, No. 3, 1971, pp. 245-252.
Tanya Khovanova, Recursive Sequences
Index entries for linear recurrences with constant coefficients, signature (5,-1).
FORMULA
G.f.: (3 + 10*x) / (1 - 5*x + x^2). - Emeric Deutsch, Dec 03 2004
a(n) = (2^(-1-n)*((5-sqrt(21))^n*(-35+3*sqrt(21)) + (5+sqrt(21))^n*(35+3*sqrt(21)))) / sqrt(21). - Colin Barker, Mar 28 2017
MAPLE
a[0]:=3: a[1]:=25: for n from 2 to 30 do a[n]:=5*a[n-1]-a[n-2] od: seq(a[n], n=0..25);
MATHEMATICA
LinearRecurrence[{5, -1}, {3, 25}, 30] (* G. C. Greubel, Nov 20 2018 *)
PROG
(PARI) Vec((3+10*x) / (1-5*x+x^2) + O(x^30)) \\ Colin Barker, Mar 28 2017
(Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( (3 +10*x)/(1-5*x+x^2))); // G. C. Greubel, Nov 20 2018
(Sage) s=((3+10*x)/(1-5*x+x^2)).series(x, 30); s.coefficients(x, sparse=False) # G. C. Greubel, Nov 20 2018
(GAP) a:=[3, 25];; for n in [3..30] do a[n]:=5*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Nov 20 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Creighton Dement, Oct 28 2004
STATUS
approved