%I #29 Sep 08 2022 08:45:01
%S 1,7,27,101,377,1407,5251,19597,73137,272951,1018667,3801717,14188201,
%T 52951087,197616147,737513501,2752437857,10272237927,38336513851,
%U 143073817477,533958756057,1992761206751,7437086070947,27755583077037
%N Expansion of (1+3*x)/(1-4*x+x^2).
%D A. H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, pp. 122-125, 194-196.
%H Vincenzo Librandi, <a href="/A054485/b054485.txt">Table of n, a(n) for n = 0..1000</a>
%H I. Adler, <a href="http://www.fq.math.ca/Scanned/7-2/adler.pdf">Three Diophantine equations - Part II</a>, Fib. Quart., 7 (1969), pp. 181-193.
%H E. I. Emerson, <a href="http://www.fq.math.ca/Scanned/7-3/emerson.pdf">Recurrent Sequences in the Equation DQ^2=R^2+N</a>, Fib. Quart., 7 (1969), pp. 231-242.
%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 (4,-1).
%F a(n) = (7*((2+sqrt(3))^n - (2-sqrt(3))^n) - ((2+sqrt(3))^(n-1) - (2-sqrt(3))^(n-1)))/2*sqrt(3).
%F a(n) = 4*a(n-1) - a(n-2), a(0)=1, a(0)=7.
%F a(n) = ChebyshevU(n,2) + 3*Chebyshev(n-1,2) = ChebyshevT(n,2) + 5*ChebyshevU(n-1,2). - _G. C. Greubel_, Jan 19 2020
%p seq( simplify(ChebyshevU(n,2) +3*ChebyshevU(n-1,2)), n=0..30); # _G. C. Greubel_, Jan 19 2020
%t LinearRecurrence[{4,-1},{1,7},40] (* _Vincenzo Librandi_, Jun 23 2012 *)
%t Table[ChebyshevU[n, 2] +3*ChebyshevU[n-1, 2], {n,0,30}] (* _G. C. Greubel_, Jan 19 2020 *)
%o (Magma) I:=[1, 7]; [n le 2 select I[n] else 4*Self(n-1)-Self(n-2): n in[1..30]]; // _Vincenzo Librandi_, Jun 23 2012
%o (PARI) Vec((1+3*x)/(1-4*x+x^2) + O(x^30)) \\ _Michel Marcus_, Mar 20 2015
%o (PARI) vector(31, n, polchebyshev(n-1,1,2) +5*polchebyshev(n-2,2,2) ) \\ _G. C. Greubel_, Jan 19 2020
%o (Sage) [chebyshev_U(n,2) + 3*chebyshev_U(n-1,2) for n in (0..30)] # _G. C. Greubel_, Jan 19 2020
%o (GAP) a:=[1,7];; for n in [3..30] do a[n]:=4*a[n-1]-a[n-2]; od; a; # _G. C. Greubel_, Jan 19 2020
%Y Cf. A054491.
%K easy,nonn
%O 0,2
%A _Barry E. Williams_, May 06 2000