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 A123941 #38 Sep 08 2022 08:45:28 %S A123941 0,1,3,9,26,75,216,622,1791,5157,14849,42756,123111,354484,1020696, %T A123941 2938977,8462447,24366645,70160958,202020427,581694636,1674922950, %U A123941 4822748423,13886550633,39984728949,115131438424,331507764639,954538564968,2748484256480 %N A123941 The (1,2)-entry in the 3 X 3 matrix M^n, where M = {{2, 1, 1}, {1, 1, 0}, {1, 0, 0}}. %C A123941 Essentially the same as A076264. - _Tom Edgar_, May 12 2015 %D A123941 Rosenblum and Rovnyak, Hardy Classes and Operator Theory, Dover, New York, 1985, page 26 %H A123941 Muniru A Asiru, <a href="/A123941/b123941.txt">Table of n, a(n) for n = 0..2000</a> %H A123941 Kai Wang, <a href="https://www.researchgate.net/publication/337943524_Fibonacci_Numbers_And_Trigonometric_Functions_Outline">Fibonacci Numbers And Trigonometric Functions Outline</a>, (2019). %H A123941 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,0,-1). %F A123941 a(n) = 3*a(n-1) - a(n-3), a(0)=0, a(1)=1, a(2)=3 (follows from the minimal polynomial x^3-3x^2+1 of the matrix M). %F A123941 a(n) = A076264(n-1). - _R. J. Mathar_, Jun 18 2008 %F A123941 G.f.: x/(1 - 3*x + x^3). - _Arkadiusz Wesolowski_, Oct 29 2012 %F A123941 a(n) = A018919(n-2) for n >= 2. - _Georg Fischer_, Oct 28 2018 %p A123941 with(linalg): M[1]:=matrix(3,3,[2,1,1,1,1,0,1,0,0]): for n from 2 to 30 do M[n]:=multiply(M[1],M[n-1]) od: 0,seq(M[n][1,2], n=1..30); %p A123941 a[0]:=0: a[1]:=1: a[2]:=3: for n from 3 to 30 do a[n]:=3*a[n-1]-a[n-3] od: seq(a[n], n=0..30); %t A123941 M = {{2,1,1}, {1,1,0}, {1,0,0}}; v[1] = {0,0,1}; v[n_]:= v[n] =M.v[n-1];Table[v[n][[2]], {n, 30}] %t A123941 LinearRecurrence[{3,0,-1}, {0,1,3}, 30] (* _G. C. Greubel_, Aug 05 2019 *) %o A123941 (GAP) a:=[0,1,3];; for n in [4..30] do a[n]:=3*a[n-1]-a[n-3]; od; a; # _Muniru A Asiru_, Oct 28 2018 %o A123941 (PARI) my(x='x+O('x^30)); concat([0], Vec(x/(1-3*x+x^3))) \\ _G. C. Greubel_, Aug 05 2019 %o A123941 (Magma) R<x>:=PowerSeriesRing(Integers(), 30); [0] cat Coefficients(R!( x/(1-3*x+x^3) )); // _G. C. Greubel_, Aug 05 2019 %o A123941 (Sage) (x/(1-3*x+x^3)).series(x, 30).coefficients(x, sparse=False) # _G. C. Greubel_, Aug 05 2019 %Y A123941 Cf. A018919, A122099, A122100. %K A123941 nonn,easy,less %O A123941 0,3 %A A123941 _Roger L. Bagula_ and _Gary W. Adamson_, Oct 25 2006 %E A123941 Edited by _N. J. A. Sloane_, Nov 07 2006