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 A131555 #39 Dec 12 2023 09:18:29 %S A131555 0,0,1,1,2,2,0,0,1,1,2,2,0,0,1,1,2,2,0,0,1,1,2,2,0,0,1,1,2,2,0,0,1,1, %T A131555 2,2,0,0,1,1,2,2,0,0,1,1,2,2,0,0,1,1,2,2,0,0,1,1,2,2,0,0,1,1,2,2,0,0, %U A131555 1,1,2,2,0,0,1,1,2,2,0,0,1,1,2,2,0,0,1,1,2,2,0,0,1,1,2,2,0,0,1,1,2,2,0,0,1 %N A131555 Period 6: repeat [0, 0, 1, 1, 2, 2]. %H A131555 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1,1,-1,1). %F A131555 G.f.: (2*x^2+1)*x^2/((1-x)*(x^2+x+1)*(x^2-x+1)). - _R. J. Mathar_, Nov 14 2007 %F A131555 a(n) = floor((n mod 6)/2). - _Gary Detlefs_, Jul 02 2011 %F A131555 a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) for n > 4; a(0)=0, a(1)=0, a(2)=1, a(3)=1, a(4)=2. - _Harvey P. Dale_, Mar 30 2012 %F A131555 a(n) = (3*sin(n*Pi/6) - sqrt(3)*cos(n*Pi/6)) * (2*sin(n*Pi/6) + sin(n*Pi/2))/3. - _Wesley Ivan Hurt_, Jun 20 2016 %F A131555 a(n) = floor(n/2) mod 3. - _Bruno Berselli_, Oct 03 2017 %F A131555 a(n) = floor(n/2) - 3*floor(n/6). - _Ridouane Oudra_, Apr 01 2023 %p A131555 A131555:=n->[0, 0, 1, 1, 2, 2][(n mod 6)+1]: seq(A131555(n), n=0..100); # _Wesley Ivan Hurt_, Jun 20 2016 %t A131555 PadRight[{}, 120, {0,0,1,1,2,2}] (* or *) LinearRecurrence[{1,-1,1,-1,1},{0,0,1,1,2},120] (* _Harvey P. Dale_, Mar 30 2012 *) %o A131555 (PARI) a(n)=n%6\2 \\ _Jaume Oliver Lafont_, Aug 28 2009 %o A131555 (Magma) &cat [[0, 0, 1, 1, 2, 2]^^20]; // _Wesley Ivan Hurt_, Jun 20 2016 %Y A131555 Cf. A105899. %K A131555 nonn,easy %O A131555 0,5 %A A131555 _Paul Curtz_, Aug 27 2007 %E A131555 Edited by _N. J. A. Sloane_, Sep 15 2007 %E A131555 Formula simplified by _Bruno Berselli_, Sep 27 2010