A087800 a(n) = 12*a(n-1) - a(n-2), with a(0) = 2 and a(1) = 12.
2, 12, 142, 1692, 20162, 240252, 2862862, 34114092, 406506242, 4843960812, 57721023502, 687808321212, 8195978831042, 97663937651292, 1163771272984462, 13867591338162252, 165247324784962562, 1969100306081388492
Offset: 0
Examples
a(4) = 20162 = 12a(3) - a(2) = 12*1692 - 142 = (6+sqrt(35))^4 + (6-sqrt(35))^4 = 20161.9999504 + 0.00004959 = 20162. G.f. = 2 + 12*x + 142*x^2 + 1692*x^3 + 20162*x^4 + 240252*x^5 + ...
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- Tanya Khovanova, Recursive Sequences
- Index entries for recurrences a(n) = k*a(n - 1) +/- a(n - 2)
- Index entries for linear recurrences with constant coefficients, signature (12,-1).
Programs
-
Magma
I:=[2,12]; [n le 2 select I[n] else 12*Self(n-1) - Self(n-2): n in [1..30]]; // G. C. Greubel, Nov 07 2018
-
Mathematica
a[0] = 2; a[1] = 12; a[n_] := 12a[n - 1] - a[n - 2]; Table[ a[n], {n, 0, 17}] (* Robert G. Wilson v, Jan 30 2004 *) CoefficientList[Series[(2 - 12 x)/(1 - 12 x + x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 28 2014 *) a[ n_] := 2 ChebyshevT[ n, 6]; (* Michael Somos, May 28 2014 *) LinearRecurrence[{12,-1},{2,12},20] (* Harvey P. Dale, Jan 29 2019 *)
-
PARI
Vec((2-12*x)/(1-12*x+x^2) + O(x^100)) \\ Colin Barker, Feb 25 2014
-
PARI
{a(n) = 2 * polchebyshev( n, 1, 6)}; /* Michael Somos, May 28 2014 */
-
Sage
[lucas_number2(n,12,1) for n in range(1,20)] # Zerinvary Lajos, Jun 25 2008
Formula
a(n) = (6+sqrt(35))^n + (6-sqrt(35))^n.
a(n) = 2*A023038(n).
G.f.: (2-12*x)/(1-12*x+x^2). - Philippe Deléham, Nov 17 2008
a(-n) = a(n). - Michael Somos, May 28 2014
Comments