OFFSET
1,2
COMMENTS
EXAMPLE
MATHEMATICA
a240542[n_] := Sum[(-1)^(k+1)*Ceiling[(n+1)/k - (k+1)/2], {k, 1, Floor[(Sqrt[8n+1]-1)/2]}]
a282198[b_] := Module[{centers={{1, 1}}, acc={1}, k=2, cPrev=1, cCur, len}, While[k<=b, cCur=a240542[k]; If[Last[acc]==cCur, AppendTo[acc, cCur], len=Length[acc]; If[First[Last[centers]]<len, AppendTo[centers, {len, k-1}]]; acc={cCur}; cPrev=cCur]; k++]; Last[Transpose[centers]]]
a282198[5000000] (* data *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Hartmut F. W. Hoft, Feb 08 2017
STATUS
approved