%I #29 Feb 27 2021 10:08:53
%S 2,27,727,19602,528527,14250627,384238402,10360186227,279340789727,
%T 7531841136402,203080369893127,5475638145978027,147639149571513602,
%U 3980781400284889227,107333458658120495527,2894022602368968490002,78031276805304028734527
%N a(n) = 27a(n-1) - a(n-2), starting with a(0) = 2 and a(1) = 27.
%C a(n+1)/a(n) converges to ((27+sqrt(725))/2) = 26.96291201...
%C Lim a(n)/a(n+1) as n approaches infinity = 0.03708798... = 2/(27+sqrt(725)) = (27-sqrt(725))/2.
%C Lim a(n+1)/a(n) as n approaches infinity = 26.96291201... = (27+sqrt(725))/2 = 2/(27-sqrt(725)).
%C Lim a(n)/a(n+1) = 27 - Lim a(n+1)/a(n).
%C A Chebyshev T-sequence with Diophantine property.
%C a(n) gives the general (nonnegative integer) solution of the Pell equation a^2 - 29*(5*b)^2 =+4 with companion sequence b(n)=A097781(n-1), n>=0.
%D O. Perron, "Die Lehre von den Kettenbruechen, Bd.I", Teubner, 1954, 1957 (Sec. 30, Satz 3.35, p. 109 and table p. 108).
%H Tanya Khovanova, <a href="http://www.tanyakhovanova.com/RecursiveSequences/RecursiveSequences.html">Recursive Sequences</a>
%H <a href="/index/Rea#recur1">Index entries for recurrences a(n) = k*a(n - 1) +/- a(n - 2)</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (27, -1).
%H <a href="/index/Ch#Cheby">Index entries for sequences related to Chebyshev polynomials.</a>
%F a(n) = 27a(n-1) - a(n-2), starting with a(0) = 2 and a(1) = 27. a(n) = ((27+sqrt(725))/2)^n + ((27-sqrt(725))/2)^n, (a(n))^2 = a(2n)+2.
%F a(n) = S(n, 27) - S(n-2, 27) = 2*T(n, 27/2) with S(n, x) := U(n, x/2), S(-1, x) := 0, S(-2, x) := -1. S(n, 27)=A097781(n). U-, resp. T-, are Chebyshev's polynomials of the second, resp. first, kind. See A049310 and A053120.
%F a(n) = ap^n + am^n, with ap := (27+5*sqrt(29))/2 and am := (27-5*sqrt(29))/2.
%F G.f.: (2-27*x)/(1-27*x+x^2).
%F a(-n) = a(n). - _Michael Somos_, Nov 01 2008
%F A087130(2*n) = a(n). - _Michael Somos_, Nov 01 2008
%e a(4) = 528527 = 27a(3) - a(2) = 27*19602 - 727 = ((27+sqrt(725))/2)^4 + ((27-sqrt(725))/2)^4 = 528526.999998107 + 0.000001892 = 528527.
%e (x;y) = (2;0), (27;1), (727;27), (19602;728), ... give the nonnegative integer solutions to x^2 - 29*(5*y)^2 = +4.
%t a[0] = 2; a[1] = 27; a[n_] := 27a[n - 1] - a[n - 2]; Table[ a[n], {n, 0, 15}] (* _Robert G. Wilson v_, Jan 30 2004 *)
%t RecurrenceTable[{a[0]==2,a[1]==27,a[n]==27a[n-1]-a[n-2]},a,{n,20}] (* or *) LinearRecurrence[{27,-1},{2,27},20] (* _Harvey P. Dale_, Jan 03 2018 *)
%o (Sage) [lucas_number2(n,27,1) for n in range(0,16)] # _Zerinvary Lajos_, Jun 27 2008
%o (PARI) {a(n) = (-1)^n * subst(2 * poltchebi(2*n), 'x, -5/2 * I)}; /* _Michael Somos_, Nov 04 2008 */
%o (Python)
%o def aupton(idx):
%o alst = [2, 27]
%o for n in range(2, idx+1): alst.append(27*alst[-1] - alst[-2])
%o return alst
%o print(aupton(16)) # _Michael S. Branicky_, Feb 27 2021
%Y Cf. A046213, A078046.
%Y a(n)=sqrt(4 + 29*(5*A097781(n-1))^2), n>=1.
%Y Cf. A077428, A078355 (Pell +4 equations).
%Y Cf. A090733 for 2*T(n, 25/2).
%Y Cf. A087130.
%K easy,nonn
%O 0,1
%A Nikolay V. Kosinov (kosinov(AT)unitron.com.ua), Jan 24 2004
%E More terms from _Robert G. Wilson v_, Jan 30 2004
%E Chebyshev and Pell comments from _Wolfdieter Lang_, Aug 31 2004