0,4

Maximum of any sum_i k_i, where sum_i k_i*(k_i+1)/2 <= n.

Table of n, a(n) for n=0..75.

For n > 2, let m be the largest value such that tetrahedral number m*(m+1)*(m+2)/6 <= n. Then a(n) = max(m*(m+1)/2, m+1 + a(n - (m+1)*(m+2)/2)), taking a(k) to be 0 for k < 0.

Row lengths of A098529.

Sequence in context: A156262 A218447 A305845 * A244989 A296021 A267097

Adjacent sequences: A120562 A120563 A120564 * A120566 A120567 A120568

nonn

Franklin T. Adams-Watters, Jun 14 2006

approved