A090248 a(n) = 27a(n-1) - a(n-2), starting with a(0) = 2 and a(1) = 27.
2, 27, 727, 19602, 528527, 14250627, 384238402, 10360186227, 279340789727, 7531841136402, 203080369893127, 5475638145978027, 147639149571513602, 3980781400284889227, 107333458658120495527, 2894022602368968490002, 78031276805304028734527
Offset: 0
Examples
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. (x;y) = (2;0), (27;1), (727;27), (19602;728), ... give the nonnegative integer solutions to x^2 - 29*(5*y)^2 = +4.
References
- O. Perron, "Die Lehre von den Kettenbruechen, Bd.I", Teubner, 1954, 1957 (Sec. 30, Satz 3.35, p. 109 and table p. 108).
Links
Crossrefs
Programs
-
Mathematica
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 *) 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 *)
-
PARI
{a(n) = (-1)^n * subst(2 * poltchebi(2*n), 'x, -5/2 * I)}; /* Michael Somos, Nov 04 2008 */
-
Python
def aupton(idx): alst = [2, 27] for n in range(2, idx+1): alst.append(27*alst[-1] - alst[-2]) return alst print(aupton(16)) # Michael S. Branicky, Feb 27 2021
-
Sage
[lucas_number2(n,27,1) for n in range(0,16)] # Zerinvary Lajos, Jun 27 2008
Formula
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.
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.
a(n) = ap^n + am^n, with ap := (27+5*sqrt(29))/2 and am := (27-5*sqrt(29))/2.
G.f.: (2-27*x)/(1-27*x+x^2).
a(-n) = a(n). - Michael Somos, Nov 01 2008
A087130(2*n) = a(n). - Michael Somos, Nov 01 2008
Extensions
More terms from Robert G. Wilson v, Jan 30 2004
Chebyshev and Pell comments from Wolfdieter Lang, Aug 31 2004
Comments