A176360 a(n) = quadrant of unit circle corresponding to n radians.
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, 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, 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
Offset: 1
Examples
a(11) is very nearly 7 quadrants as Pi is nearly exactly 22/7. Indeed, 11 radians lies just 4.4 milliradian (0.25 degree) within the 4th quadrant.
Programs
-
End
-
Mathematica
Table[Mod[1+Floor[(2n)/Pi],4],{n,120}]/.(0->4) (* Harvey P. Dale, Apr 09 2020 *)
-
Other
# a(n) = 1 + {floor [2*n/pi] modulo(4)} # Ruby code by Andy Martin # Overkill here, 4 places properly gives first 200 terms. t = 2000000000000000000000000000000000000000000000000000000000000000000 pi = 3141592653589793238462643383279502884197169399375105820974944592307 (1..200).each{ |n| print "#{1 + ((n*t)/pi)%4},"} print "\b \n"
Formula
a(n) = 1 + {floor [2*n/Pi] modulo(4)}. - Adam Helman, Apr 20 2010
Comments