OFFSET
1,5
COMMENTS
a(n)>=0.
|a(n+1)-a(n)|=1.
All local minima occur where a(n)=0. Values at the local maxima are listed in A272729.
Empirically: The least n such that a(n) = k - 1 is n = 2^k - k. - Danny Rorabaugh, May 12 2016
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..8192
MATHEMATICA
nn = 120; s = Nest[Append[#, Count[# - Reverse[#], x_ /; x == 0]] &, {0}, 2 nn - 1]; Table[s[[2 n]] - n, {n, nn}] (* Michael De Vlieger, May 05 2016, after Ivan Neretin at A272727 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ivan Neretin, May 05 2016
STATUS
approved