login
a(n) = floor((sqrt(1+8*n)-3)/2).
5

%I #9 Oct 02 2021 14:59:27

%S 0,0,1,1,1,2,2,2,2,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5,5,6,6,6,6,6,6,6,

%T 6,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,10,10,

%U 10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11

%N a(n) = floor((sqrt(1+8*n)-3)/2).

%D R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 7.2(d).

%t Floor[(Sqrt[1 + 8 Range[100]] - 3)/2] (* _Wesley Ivan Hurt_, Oct 02 2021 *)

%K nonn

%O 1,6

%A _N. J. A. Sloane_, Jan 23 2000