STATUS
reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
a(18)-Offset changed, a(19) -a(20) from Jud McCranie, Dec 28 2019
proposed
editing
editing
proposed
0,1,2
reviewed
editing
proposed
reviewed
editing
proposed
Block[{s = Nest[Append[#1, If[And[#3 > 0, FreeQ[#1, #3]], #3, #1[[-1]] + #2]] & @@ {#1, #2, #1[[-1]] - #2} & @@ {#, Length@ #} &, {0}, 10^5], t}, t = MapIndexed[#1/First@ #2 &, s]; -1 + Rest@ Map[FirstPosition[t, #][[1]] &, Union@ FoldList[Max, t]] ] (* Michael De Vlieger, Dec 29 2019 *)
reviewed
editing
proposed
reviewed