OFFSET
1,1
FORMULA
a(n) = ceiling((-1 + sqrt(8n^2 + 8n + 1))/2). - Joshua Zucker, May 08 2006
EXAMPLE
a(6)= 9, 7+8+9 > 1+2+3+4+5+6, but 7+8 < 1+2+3+4+5+6.
MATHEMATICA
Table[Ceiling[(-1 + Sqrt[8 n^2 + 8 n + 1])/2], {n, 0, 80}] (* Vincenzo Librandi, Jun 23 2015 *)
PROG
(PARI) a(n) = {my(k=1); while (sum(j=n+1, k, j) < n*(n+1)/2, k++); k; } \\ Michel Marcus, Jul 23 2015
(Magma) [Ceiling((-1 + Sqrt(8*n^2 + 8*n + 1))/2): n in [1..80]]; // Vincenzo Librandi, Jul 23 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Mar 29 2004
EXTENSIONS
More terms from Joshua Zucker, May 08 2006
STATUS
approved