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 A131026 #37 Dec 12 2023 09:23:24 %S A131026 2,2,1,0,0,1,2,2,1,0,0,1,2,2,1,0,0,1,2,2,1,0,0,1,2,2,1,0,0,1,2,2,1,0, %T A131026 0,1,2,2,1,0,0,1,2,2,1,0,0,1,2,2,1,0,0,1,2,2,1,0,0,1,2,2,1,0,0,1,2,2, %U A131026 1,0,0,1,2,2,1,0,0,1,2,2,1,0,0,1,2,2,1,0,0,1,2,2,1,0,0,1,2,2,1,0,0,1,2,2,1 %N A131026 Periodic sequence (2, 2, 1, 0, 0, 1). %C A131026 Second column of triangular array T defined in A131022. %H A131026 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2, -2, 1). %F A131026 a(1) = a(2) = 2, a(3) = 1, a(4) = a(5) = 0, a(6) = 1; for n > 6, a(n) = a(n-6). %F A131026 G.f.: (2-2*x+x^2)/((1-x)*(1-x+x^2)). %F A131026 a(n) = A021823(n+2). %F A131026 a(n) = floor(((n+3) mod 6)/4)+floor(((n+2) mod 3)/2). - _Gary Detlefs_, Oct 02 2013 %F A131026 a(n) = 1+2/sqrt(3)*sin(Pi/3*n). - _Werner Schulte_, Jul 21 2017 %t A131026 PadRight[{},120,{2,2,1,0,0,1}] (* or *) LinearRecurrence[{2,-2,1},{2,2,1},120] (* _Harvey P. Dale_, Jul 16 2012 *) %o A131026 (PARI) {m=105; for(n=1, m, r=(n-1)%6; print1(if(r<2, 2, if(r==2||r==5, 1, 0)), ","))} %o A131026 (Magma) m:=105; [ [2, 2, 1, 0, 0, 1][(n-1) mod 6 + 1]: n in [1..m] ]; %Y A131026 Cf. A131022, A021823. Other columns of T are in A088911, A131027, A131028, A131029, A131030. %K A131026 nonn,easy %O A131026 1,1 %A A131026 _Klaus Brockhaus_, following a suggestion of _Paul Curtz_, Jun 10 2007