OFFSET
2,1
COMMENTS
a(n) is the least k such that 2*p(n) < p(n+k), where p(n) is the n-th partial sum of the sequence c(n) = n.
LINKS
Clark Kimberling, Table of n, a(n) for n = 2..1000
FORMULA
a(n) = 1 + Floor[(-2 n - 1 + sqrt(8*n^2 + 8*n + 1)/2)].
EXAMPLE
3 <= 1 + 2 < 3 + 4, so a(2) = 2
4 <= 1 + 2 + 3 < 4 + 5, so a(3) = 3.
11+12+13+14 <= 55 < 11+12+13+14+15, so a(10) = 5.
MATHEMATICA
1 + Table[test = n (1 + n); NestWhile[# + 1 &, n + 1, test >= -(n - #1) (1 + n + #1) &] - n - 1, {n, 2, 120}] (* Peter J. C. Moses, Nov 07 2013 *)
t = 1 + Table[Floor[(-2 n - 1 + Sqrt[8 n^2 + 8 n + 1])/2], {n, 2, 120}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Nov 09 2013
STATUS
approved