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 A246389 #7 Jan 18 2024 10:21:21 %S A246389 0,1,2,7,8,13,14,19,20,26,27,32,33,38,39,44,45,46,51,52,57,58,63,64, %T A246389 70,71,76,77,82,83,88,89,90,95,96,101,102,107,108,114,115,120,121,126, %U A246389 127,132,133,134,139,140,145,146,151,152,158,159,164,165,170,171 %N A246389 Nonnegative integers k satisfying sin(k) >= 0 and sin(k+1) >= 0. %C A246389 A246388 and A038130 (Beatty sequence for 2*Pi) partition A022844 (Beatty sequence for Pi). Likewise, A054386, the complement of A022844, is partitioned by A246389 and A246390. (See the Mathematica program.) %H A246389 Clark Kimberling, <a href="/A246389/b246389.txt">Table of n, a(n) for n = 0..1000</a> %p A246389 Digits := 100: %p A246389 isA246389 := proc(k) %p A246389 if evalf(sin(k)) >= 0 and evalf(sin(k+1)) >= 0 then %p A246389 return true ; %p A246389 else %p A246389 return false ; %p A246389 end if; %p A246389 end proc: %p A246389 A246389 := proc(n) %p A246389 option remember ; %p A246389 if n = 1 then %p A246389 0; %p A246389 else %p A246389 for a from procname(n-1)+1 do %p A246389 if isA246389(a) then %p A246389 return a; %p A246389 end if; %p A246389 end do: %p A246389 end if; %p A246389 end proc: %p A246389 seq(A246389(n),n=1..100) ; # assumes offset 1 _R. J. Mathar_, Jan 18 2024 %t A246389 z = 400; f[x_] := Sin[x] %t A246389 Select[Range[0, z], f[#]*f[# + 1] <= 0 &] (* A022844 *) %t A246389 Select[Range[0, z], f[#] >= 0 && f[# + 1] <= 0 &] (* A246388 *) %t A246389 Select[Range[0, z], f[#] <= 0 && f[# + 1] >= 0 &] (* A038130 *) %t A246389 Select[Range[0, z], f[#]*f[# + 1] > 0 &] (* A054386 *) %t A246389 Select[Range[0, z], f[#] >= 0 && f[# + 1] >= 0 &] (* A246389 *) %t A246389 Select[Range[0, z], f[#] <= 0 && f[# + 1] <= 0 &] (* A246390 *) %Y A246389 Cf. A022844, A038130, A054386, A246388, A246390. %K A246389 nonn,easy %O A246389 0,3 %A A246389 _Clark Kimberling_, Aug 24 2014