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 A133874 #16 Apr 16 2023 22:13:21 %S A133874 1,1,1,1,2,2,2,2,3,3,3,3,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,0,0,0,1,1, %T A133874 1,1,2,2,2,2,3,3,3,3,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,0,0,0,1,1,1,1, %U A133874 2,2,2,2,3,3,3,3,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,0,0,0,1,1,1,1,2,2,2,2,3 %N A133874 n modulo 4 repeated 4 times. %C A133874 Periodic with length 4^2 = 16. %H A133874 <a href="/index/Rec#order_13">Index entries for linear recurrences with constant coefficients</a>, signature (1, 0, 0, -1, 1, 0, 0, -1, 1, 0, 0, -1, 1). %F A133874 a(n) = (1 + floor(n/4)) mod 4. %F A133874 a(n) = A010873(A002265(n+4)). %F A133874 a(n) = 1 + floor(n/4) - 4*floor((n+4)/16). %F A133874 a(n) = (((n+4) mod 16) - (n mod 4))/4. %F A133874 a(n) = ((n + 4 - (n mod 4))/4) mod 4. %F A133874 G.f. g(x) = (1 + x + x^2 + x^3 + 2x^4 + 2x^5 + 2x^6 + 2x^7 + 3x^8 + 3x^9 + 3x^10 + 3x^11)/(1-x^16). %F A133874 G.f. g(x) = ((1-x^4)*(1+2x^4+3x^8))/((1-x)*(1-x^16)). %F A133874 G.f. g(x) = (3x^16-4x^12+1)/((1-x)*(1-x^4)*(1-x^16)). %F A133874 G.f. g(x) = (1+2x^4+3x^8)/((1-x)*(1+x^4)*(1+x^8)). %t A133874 Flatten[Table[Table[Mod[n,4],{4}],{n,30}]] (* _Harvey P. Dale_, Dec 22 2013 *) %o A133874 (Python) %o A133874 def A133874(n): return 1+(n>>2)&3 # _Chai Wah Wu_, Jan 18 2023 %Y A133874 Cf. A000040, A133620-A133625, A133630, A038509, A133634-A133636. %Y A133874 Cf. A133884, A133880, A133890, A133900, A133910. %K A133874 nonn %O A133874 0,5 %A A133874 _Hieronymus Fischer_, Oct 10 2007