%I #25 Jan 05 2025 19:51:37
%S 3,25,122,585,2803,13430,64347,308305,1477178,7077585,33910747,
%T 162476150,778470003,3729873865,17870899322,85624622745,410252214403,
%U 1965636449270,9417930031947,45124013710465,216202138520378,1035886678891425,4963231255936747
%N a(n) = 5*a(n-1) - a(n-2), a(0) = 3, a(1) = 25.
%H Colin Barker, <a href="/A099868/b099868.txt">Table of n, a(n) for n = 0..1000</a>
%H A. F. Horadam, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/9-3/horadam-a.pdf">Pell Identities</a>, Fib. Quart., Vol. 9, No. 3, 1971, pp. 245-252.
%H Tanya Khovanova, <a href="http://www.tanyakhovanova.com/RecursiveSequences/RecursiveSequences.html">Recursive Sequences</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (5,-1).
%F |2*A099867(n) + a(n) - A003501(n+1)| = 20*A004254(n)
%F G.f.: (3 + 10*x) / (1 - 5*x + x^2). - _Emeric Deutsch_, Dec 03 2004
%F 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
%p 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);
%t LinearRecurrence[{5,-1}, {3,25}, 30] (* _G. C. Greubel_, Nov 20 2018 *)
%o (PARI) Vec((3+10*x) / (1-5*x+x^2) + O(x^30)) \\ _Colin Barker_, Mar 28 2017
%o (Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( (3 +10*x)/(1-5*x+x^2))); // _G. C. Greubel_, Nov 20 2018
%o (Sage) s=((3+10*x)/(1-5*x+x^2)).series(x,30); s.coefficients(x, sparse=False) # _G. C. Greubel_, Nov 20 2018
%o (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
%Y Cf. A003501, A004254.
%K easy,nonn
%O 0,1
%A _Creighton Dement_, Oct 28 2004