login
A322288
Indices n for which the partial sums of sin(k) (0 <= k <= n) reach a new minimum.
0
0, 6, 12, 56, 100, 144, 188, 521, 1231, 1941, 2651, 3361, 4071, 4781, 5491, 6201, 6911, 7621, 8331, 9041, 9751, 10461, 11171, 11881, 12591, 13301, 14011, 14721, 15431, 16141, 16851, 17561, 18271, 18981, 19691, 20401, 21111, 21821, 22531, 23241, 23951, 24661, 25371, 26081, 26791, 27501, 28211, 28921, 29631
OFFSET
0,2
EXAMPLE
The partial sums are 0, 0.84147.. = A049469, 1.7507.., 1.89188.., 1.13508.., 0.1761..., -0.1032..., 0.5537,..., and -0.1032.. is the first to become smaller than 0, so a(1)=6. - R. J. Mathar, Nov 14 2019
MATHEMATICA
n = 30000;
i = Range[0, n];
x = Accumulate[N[Sin[i]]];
y = Table[Min[x[[1 ;; k]]], {k, n + 1}];
z = DeleteDuplicatesBy[Transpose[{i, y}], Last][[All, 1]]
PROG
(Python)
x = numpy.arange(n)
y = numpy.sin(x)
y = numpy.cumsum(y)
y = numpy.minimum.accumulate(y)
y = numpy.diff(y)
y = numpy.insert(y, 0, -1)
x[y < 0.]
CROSSREFS
Sequence in context: A341893 A324529 A076722 * A337739 A076305 A088944
KEYWORD
nonn
AUTHOR
Josselin Noirel, Dec 04 2018
STATUS
approved