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 A176360 #6 Apr 09 2020 19:08:06 %S A176360 1,2,2,3,4,4,1,2,2,3,4,4,1,1,2,3,3,4,1,1,2,3,3,4,4,1,2,2,3,4,4,1,2,2, %T A176360 3,3,4,1,1,2,3,3,4,1,1,2,2,3,4,4,1,2,2,3,4,4,1,1,2,3,3,4,1,1,2,3,3,4, %U A176360 4,1,2,2,3,4,4,1,2,2,3,3,4,1,1,2,3,3,4,1,1,2,2,3,4,4,1,2,2,3,4,4,1,1,2,3,3 %N A176360 a(n) = quadrant of unit circle corresponding to n radians. %C A176360 Radians are the natural measure of angle. Quadrants (1 through 4) determine the signs of (x,y); of (cos x, sin x); and are ubiquitous. %C A176360 Thereby it is "interesting" to consider which quadrant contains successively larger integer radian measure. %F A176360 a(n) = 1 + {floor [2*n/Pi] modulo(4)}. - _Adam Helman_, Apr 20 2010 %e A176360 a(11) is very nearly 7 quadrants as Pi is nearly exactly 22/7. %e A176360 Indeed, 11 radians lies just 4.4 milliradian (0.25 degree) within the 4th quadrant. %t A176360 Table[Mod[1+Floor[(2n)/Pi],4],{n,120}]/.(0->4) (* _Harvey P. Dale_, Apr 09 2020 *) %o A176360 From _Adam Helman_, Apr 20 2010: (Start) %o A176360 (Other) # a(n) = 1 + {floor [2*n/pi] modulo(4)} %o A176360 # Ruby code by Andy Martin %o A176360 # Overkill here, 4 places properly gives first 200 terms. %o A176360 t = 2000000000000000000000000000000000000000000000000000000000000000000 %o A176360 pi = 3141592653589793238462643383279502884197169399375105820974944592307 %o A176360 (1..200).each{ |n| print "#{1 + ((n*t)/pi)%4},"} %o A176360 print "\b \n" %o A176360 (End) %K A176360 nonn,easy %O A176360 1,2 %A A176360 _Adam Helman_, Apr 15 2010, Apr 20 2010