Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #13 Nov 20 2019 16:29:46
%S 0,1,-1,-3,2,7,12,11,10,9,8,13,18,23,28,33,19,5,-9,-23,-37,-51,-50,
%T -49,-48,-47,-46,-45,-44,-52,-60,-68,-76,-84,-92,-100,-108,-83,-58,
%U -33,-8,17,42,67,92,117,116,115,114,113,112,111,110,109,108,107,118,129
%N Sequence of distinct integers such that a(1) = 0, and for k = 1, 2, ..., the last term so far and the k next terms are in arithmetic progression with common difference d_k such that abs(d_k) is as small as possible and d_k > 0 iff k is odd.
%C The sequence zigzags and A000124 corresponds to the indices of its extrema.
%C Will this sequence change sign infinitely often?
%H Rémy Sigrist, <a href="/A329724/b329724.txt">Table of n, a(n) for n = 1..10012</a>
%H Rémy Sigrist, <a href="/A329724/a329724.txt">C++ program for A329724</a>
%H Rémy Sigrist, <a href="/A329724/a329724.png">Scatterplot of the first 39582754 terms</a>
%e The first terms, alongside the corresponding k and d_k, are:
%e n a(n) k d_k
%e -- ---- --- ---
%e 1 0 N/A N/A
%e 2 1 1 1
%e 3 -1 2 -2
%e 4 -3 2 -2
%e 5 2 3 5
%e 6 7 3 5
%e 7 12 3 5
%e 8 11 4 -1
%e 9 10 4 -1
%e 10 9 4 -1
%e 11 8 4 -1
%e 12 13 5 5
%e 13 18 5 5
%e 14 23 5 5
%e 15 28 5 5
%e 16 33 5 5
%o (C++) See Links section.
%Y Cf. A000124, A001057.
%K sign,look
%O 1,4
%A _Rémy Sigrist_, Nov 19 2019