login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A085141
Greatest nonnegative integer k such that k(3k+1)/2 <= n.
2
0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8
OFFSET
0,8
FORMULA
a(n) = floor((sqrt(24n+1)-1)/6).
a(A005449(n)) = n.
PROG
(PARI) a(n)=if(n<0, 0, (sqrtint(24*n+1)-1)\6)
CROSSREFS
Cf. A005449.
Sequence in context: A071842 A344517 A371355 * A082896 A079416 A135664
KEYWORD
nonn,easy
AUTHOR
Michael Somos, Jun 19 2003
STATUS
approved