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 A037480 #27 Dec 15 2019 13:24:05 %S A037480 1,5,16,50,151,455,1366,4100,12301,36905,110716,332150,996451,2989355, %T A037480 8968066,26904200,80712601,242137805,726413416,2179240250,6537720751, %U A037480 19613162255,58839486766,176518460300,529555380901 %N A037480 Base-3 digits are, in order, the first n terms of the periodic sequence with initial period 1,2. %H A037480 Vincenzo Librandi, <a href="/A037480/b037480.txt">Table of n, a(n) for n = 1..200</a> %H A037480 <a href="/index/Rec">Index entries for linear recurrences with constant coefficients</a>, signature (3,1,-3). %F A037480 a(n) = (5*3^n + (-1)^n - 6)/8 . - _Paul D. Hanna_, Sep 23 2007 %F A037480 a(n) = 3*a(n-1)+a(n-2)-3*a(n-3). G.f.: x*(2*x+1) / ((x-1)*(x+1)*(3*x-1)). - _Colin Barker_, Apr 30 2014 %p A037480 a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=2*a[n-1]+3*a[n-2]+3 od: seq(a[n], n=1..33); # _Zerinvary Lajos_, Dec 14 2008 %t A037480 CoefficientList[Series[(2 x + 1)/((x - 1) (x + 1) (3 x - 1)), {x, 0, 40}], x] (* _Vincenzo Librandi_, May 01 2014 *) %t A037480 Table[FromDigits[PadRight[{},n,{1,2}],3],{n,30}] (* or *) LinearRecurrence[ {3,1,-3},{1,5,16},30] (* _Harvey P. Dale_, Dec 15 2019 *) %o A037480 (PARI) Vec(x*(2*x+1)/((x-1)*(x+1)*(3*x-1)) + O(x^100)) \\ _Colin Barker_, Apr 30 2014 %K A037480 nonn,base,easy %O A037480 1,2 %A A037480 _Clark Kimberling_