A099868 a(n) = 5*a(n-1) - a(n-2), a(0) = 3, a(1) = 25.
3, 25, 122, 585, 2803, 13430, 64347, 308305, 1477178, 7077585, 33910747, 162476150, 778470003, 3729873865, 17870899322, 85624622745, 410252214403, 1965636449270, 9417930031947, 45124013710465, 216202138520378, 1035886678891425, 4963231255936747
Offset: 0
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).
Programs
-
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
-
Magma
m:=30; R
:=PowerSeriesRing(Integers(), m); Coefficients(R!( (3 +10*x)/(1-5*x+x^2))); // G. C. Greubel, Nov 20 2018 -
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 *)
-
PARI
Vec((3+10*x) / (1-5*x+x^2) + O(x^30)) \\ Colin Barker, Mar 28 2017
-
Sage
s=((3+10*x)/(1-5*x+x^2)).series(x,30); s.coefficients(x, sparse=False) # G. C. Greubel, Nov 20 2018
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