login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A191153
a(n) = floor(2*n*Pi) - 2*floor(n*Pi).
4
0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1
OFFSET
1
COMMENTS
Equivalently, the nearest integer to the fractional part of n*Pi. - Rick L. Shepherd, Aug 24 2020
Up to n = 53 (respectively n = 16551), the sequence appears to be 7-periodic (a(n) = a(n-7); 000 1111 repeated), respectively 113-periodic. This is a consequence of the fact that 7*Pi and 113*Pi are close to an integer: Pi ~ 355/113 ~ 22/7. - M. F. Hasler, Nov 30 2024
LINKS
FORMULA
a(n) = A038130(n) - 2*A022844(n). - Michel Marcus, Aug 24 2020
MAPLE
A191153:=n->floor(2*n*Pi) - 2*floor(n*Pi): seq(A191153(n), n=1..100); # Wesley Ivan Hurt, Jul 03 2014
MATHEMATICA
f[n_] := Floor[2 n*Pi] - 2*Floor[n*Pi];
t = Table[f[n], {n, 1, 220}] (* A191153 *)
Flatten[Position[t, 0]] (* A191159 *)
Flatten[Position[t, 1]] (* A191164 *)
PROG
(PARI) a(n) = round(frac(n*Pi)) \\ Rick L. Shepherd, Aug 24 2020
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Clark Kimberling, May 27 2011
STATUS
approved