login
A283144
Partial sums of A283131.
2
1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 2, 1, 0, 1, 2, 1, 2, 3, 4, 3, 2, 3, 2, 3, 4, 3, 2, 3, 4, 5, 4, 5, 6, 5, 4, 5, 4, 5, 6, 5, 6, 5, 4, 5, 6, 5, 6, 7, 8, 7, 6, 7, 6, 7, 8, 7, 6, 7, 6, 5, 4, 5, 6, 5, 6, 5, 4, 5, 6, 5, 4, 3, 4, 3, 2, 3, 4, 3, 4, 3, 2, 3, 2, 3, 4, 3, 2, 3, 2, 1, 0, 1, 2, 1, 2, 1, 0, 1, 2
OFFSET
1,4
COMMENTS
There appears to be (on average) slightly more 1 (forward steps) than -1 (backward steps) in A283131: the partial sums keep slowly increasing (as a global trend), though non-monotically.
The average (from 1 to n) of the partial sums keeps increasing (as a global trend), though non-monotically. Furthermore, it appears that the average (from 1 to n) of partial sums is always positive.
Average (from 1 to n) of the partial sums:
1 to 10000: 2.674
1 to 20000: 5.908
1 to 30000: 8.866
1 to 40000: 9.1975
1 to 50000: 10.511
Those averages seem to be asymptotic to some strictly increasing concave [yet unknown] function.
The first negative partial sum is a(103) = -1.
First occurrence of k beginning at -8: 1406, 1405, 1186, 1183, 326, 325, 106, 103, 2, 1, 4, 19, 20, 31, 34, 49, 50, 2817, 3264, 4121, 4124, 4343, 4344, 12857, 14552, 14553, 15368, 15375, 15386, 15597, 15598, 15609, 21344, 21563, 21564, 46907, 46918, 47129, 47130, 47141, ..., . Robert G. Wilson v, Mar 19 2017
LINKS
MATHEMATICA
a[1] = 1; a[2] = -1; suffix[lst_] := If[ MatchQ[lst, {___, b__, b__}], lst /. {___, b__, b__} :> {b}, {}]; a[n_] := a[n] = Module[{aa, lg1, lg2}, aa = Array[a, n - 1]; lg1 = suffix[Append[aa, 1]] // Length; lg2 = suffix[Append[aa, -1]] // Length; If[lg1 <= lg2, 1, -1]]; Accumulate@Array[a, 100] (* Robert G. Wilson v, Mar 19 2017 after Jean-François Alcover in A006345 *)
CROSSREFS
Sequence in context: A316491 A097468 A339975 * A098381 A318463 A030372
KEYWORD
sign
AUTHOR
Daniel Forgues, Mar 01 2017
STATUS
approved