login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A246298 Numbers k such that sin(k) > sin(k+1) > sin(k+2) < sin(k+3). 4
3, 9, 15, 22, 28, 34, 40, 47, 53, 59, 66, 72, 78, 84, 91, 97, 103, 110, 116, 122, 128, 135, 141, 147, 154, 160, 166, 172, 179, 185, 191, 197, 204, 210, 216, 223, 229, 235, 241, 248, 254, 260, 267, 273, 279, 285, 292, 298, 304, 311, 317, 323, 329, 336, 342 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The sequences A026309, A246297, A246298, A246299 partition the nonnegative integers.
LINKS
MATHEMATICA
z = 500; f[x_] := f[x] = Sin[x]; t = Range[0, z];
Select[t, f[#] < f[# + 1] &] (* A026309 *)
Select[t, f[#] > f[# + 1] < f[# + 2] &] (* A246297 *)
Select[t, f[#] > f[# + 1] > f[# + 2] < f[# + 3] &] (* A246298 *)
Select[t, f[#] > f[# + 1] > f[# + 2] > f[# + 3] < f[# + 4] &] (* A246299 *)
Flatten[Position[Partition[Sin[Range[350]], 4, 1], _?(#[[1]]>#[[2]]>#[[3]]<#[[4]]&), 1, Heads->False]] (* Harvey P. Dale, Aug 03 2017 *)
PROG
(PARI) q(n)=my(s0=sin(n), s1=sin(n+1), s2=sin(n+2), s3=sin(n+3)); if( (s0>s1) && (s1>s2) && (s2<s3) , print1(n, ", "));
for(n=1, 400, q(n)) \\ Joerg Arndt, Aug 03 2017
(PARI) list(lim)=my(v=List(), u=vector(4, x, sin(x+2))); forstep(k=3, lim-3, 4, u[4]=sin(k+3); if(u[1]>u[2]&&u[2]>u[3]&&u[3]<u[4], listput(v, k)); u[1]=sin(k+4); if(u[2]>u[3]&&u[3]>u[4]&&u[4]<u[1], listput(v, k+1)); u[2]=sin(k+5); if(u[3]>u[4]&&u[4]>u[1]&&u[1]<u[2], listput(v, k+2)); u[3]=sin(k+6); if(u[4]>u[1]&&u[1]>u[2]&&u[2]<u[3], listput(v, k+3))); for(k=lim\4*4+1, lim, if(sin(k)>sin(k+1)&&sin(k+1)>sin(k+2)&&sin(k+2)<sin(k+3), listput(v, k))); Vec(v) \\ Charles R Greathouse IV, Aug 03 2017
(Python)
from sympy import sin
def ok(n):
s0, s1, s2, s3 = sin(n), sin(n + 1), sin(n + 2), sin(n + 3)
return s0>s1 and s1>s2 and s2<s3
print([n for n in range(1, 501) if ok(n)]) # Indranil Ghosh, Aug 03 2017
CROSSREFS
Cf. A246297, A246299, A246293 (complement of A026309).
Sequence in context: A029482 A174786 A216974 * A139419 A323031 A058972
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Aug 21 2014
EXTENSIONS
Name corrected by Harvey P. Dale, Aug 03 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 17 18:21 EDT 2024. Contains 375227 sequences. (Running on oeis4.)