%I #34 Dec 06 2024 11:38:45
%S 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,
%T 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,
%U 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
%N a(n) = floor(2*n*Pi) - 2*floor(n*Pi).
%C Equivalently, the nearest integer to the fractional part of n*Pi. - _Rick L. Shepherd_, Aug 24 2020
%C 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
%H Rick L. Shepherd, <a href="/A191153/b191153.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A038130(n) - 2*A022844(n). - _Michel Marcus_, Aug 24 2020
%p A191153:=n->floor(2*n*Pi) - 2*floor(n*Pi): seq(A191153(n), n=1..100); # _Wesley Ivan Hurt_, Jul 03 2014
%t f[n_] := Floor[2 n*Pi] - 2*Floor[n*Pi];
%t t = Table[f[n], {n, 1, 220}] (* A191153 *)
%t Flatten[Position[t, 0]] (* A191159 *)
%t Flatten[Position[t, 1]] (* A191164 *)
%o (PARI) a(n) = round(frac(n*Pi)) \\ _Rick L. Shepherd_, Aug 24 2020
%Y Cf. A038130, A022844, A191159, A191164.
%K nonn,easy
%O 1
%A _Clark Kimberling_, May 27 2011