|
|
A138395
|
|
a(n) = 6*a(n-1) - 3*a(n-2), a(1) = 1, a(2) = 6.
|
|
10
|
|
|
1, 6, 33, 180, 981, 5346, 29133, 158760, 865161, 4714686, 25692633, 140011740, 762992541, 4157920026, 22658542533, 123477495120, 672889343121, 3666903573366, 19982753410833, 108895809744900, 593426598236901, 3233872160186706, 17622953166409533
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(n) equals the number of words of length n-1 over {0,1,2,3,4,5} avoiding 01, 02 and 03. - Milan Janjic, Dec 17 2015
|
|
LINKS
|
|
|
FORMULA
|
Limit_{n->oo} a(n)/a(n-1) = 3 + sqrt(6) = 5.44948974...
a(n) = lower left term of n-th power of 2 X 2 matrix [1,2; 1,5].
a(n) = Chebyshev_U(n, sqrt(3))*(sqrt(3))^n. - Paul Barry, Sep 28 2009
|
|
EXAMPLE
|
a(5) = 981 = 6*a(4) - 3*a(3) = 6*180 - 3*33.
|
|
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 *)
|
|
PROG
|
(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
(PARI) Vec(1/(1-6*x+3*x^2) + O(x^100)) \\ Altug Alkan, Dec 17 2015
(SageMath)
A138395=BinaryRecurrenceSequence(6, -3, 0, 1)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|