This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A138395 #69 Jan 11 2024 00:22:25 %S A138395 1,6,33,180,981,5346,29133,158760,865161,4714686,25692633,140011740, %T A138395 762992541,4157920026,22658542533,123477495120,672889343121, %U A138395 3666903573366,19982753410833,108895809744900,593426598236901,3233872160186706,17622953166409533 %N A138395 a(n) = 6*a(n-1) - 3*a(n-2), a(1) = 1, a(2) = 6. %C A138395 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 %H A138395 G. C. Greubel, <a href="/A138395/b138395.txt">Table of n, a(n) for n = 1..1000</a> %H A138395 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (6,-3). %F A138395 Limit_{n->oo} a(n)/a(n-1) = 3 + sqrt(6) = 5.44948974... %F A138395 a(n) = ((3+sqrt(6))^n - (3-sqrt(6))^n)/(2*sqrt(6)). - _Alexander R. Povolotsky_, Apr 01 2008 %F A138395 a(n) = lower left term of n-th power of 2 X 2 matrix [1,2; 1,5]. %F A138395 G.f.: 1/(1 - 6*x + 3*x^2). - _Philippe Deléham_, Sep 09 2009 %F A138395 a(n) = Chebyshev_U(n, sqrt(3))*(sqrt(3))^n. - _Paul Barry_, Sep 28 2009 %e A138395 a(5) = 981 = 6*a(4) - 3*a(3) = 6*180 - 3*33. %t A138395 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 *) %t A138395 LinearRecurrence[{6,-3},{1,6},30] (* _Harvey P. Dale_, Jan 18 2012 *) %o A138395 (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 %o A138395 (PARI) Vec(1/(1-6*x+3*x^2) + O(x^100)) \\ _Altug Alkan_, Dec 17 2015 %o A138395 (SageMath) %o A138395 A138395=BinaryRecurrenceSequence(6,-3,0,1) %o A138395 [A138395(n) for n in range(1,30)] # _G. C. Greubel_, Jan 10 2024 %Y A138395 Cf. A084120, A190958. %K A138395 nonn,easy %O A138395 1,2 %A A138395 _Gary W. Adamson_, Mar 19 2008 %E A138395 More terms from _Philippe Deléham_, Sep 09 2009 %E A138395 a(21) and first formula corrected by _Klaus Brockhaus_, Oct 05 2009 %E A138395 Extended by _T. D. Noe_, May 23 2011