A138395 a(n) = 6*a(n-1) - 3*a(n-2), a(1) = 1, a(2) = 6.
1, 6, 33, 180, 981, 5346, 29133, 158760, 865161, 4714686, 25692633, 140011740, 762992541, 4157920026, 22658542533, 123477495120, 672889343121, 3666903573366, 19982753410833, 108895809744900, 593426598236901, 3233872160186706, 17622953166409533
Offset: 1
Examples
a(5) = 981 = 6*a(4) - 3*a(3) = 6*180 - 3*33.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (6,-3).
Programs
-
Magma
I:=[1,6]; [n le 2 select I[n] else 6*Self(n-1)-3*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Dec 17 2015
-
Mathematica
a[n_]:=(MatrixPower[{{1,2},{1,5}},n].{{1},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 19 2010 *) LinearRecurrence[{6,-3},{1,6},30] (* Harvey P. Dale, Jan 18 2012 *)
-
PARI
Vec(1/(1-6*x+3*x^2) + O(x^100)) \\ Altug Alkan, Dec 17 2015
-
SageMath
A138395=BinaryRecurrenceSequence(6,-3,0,1) [A138395(n) for n in range(1,30)] # G. C. Greubel, Jan 10 2024
Formula
Limit_{n->oo} a(n)/a(n-1) = 3 + sqrt(6) = 5.44948974...
a(n) = ((3+sqrt(6))^n - (3-sqrt(6))^n)/(2*sqrt(6)). - Alexander R. Povolotsky, Apr 01 2008
a(n) = lower left term of n-th power of 2 X 2 matrix [1,2; 1,5].
G.f.: 1/(1 - 6*x + 3*x^2). - Philippe Deléham, Sep 09 2009
a(n) = Chebyshev_U(n, sqrt(3))*(sqrt(3))^n. - Paul Barry, Sep 28 2009
Extensions
More terms from Philippe Deléham, Sep 09 2009
a(21) and first formula corrected by Klaus Brockhaus, Oct 05 2009
Extended by T. D. Noe, May 23 2011
Comments