A246298 Numbers k such that sin(k) > sin(k+1) > sin(k+2) < sin(k+3).
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
Offset: 1
Links
- Clark Kimberling, Table of n, a(n) for n = 1..1000
Programs
-
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 *)
-
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
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[3]&&u[3]>u[4]&&u[4]u[4]&&u[4]>u[1]&&u[1]u[1]&&u[1]>u[2]&&u[2]sin(k+1)&&sin(k+1)>sin(k+2)&&sin(k+2)
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
Indranil Ghosh, Aug 03 2017
Extensions
Name corrected by Harvey P. Dale, Aug 03 2017
Comments