A061337 Smallest number of distinct triangular numbers which sum to n (or -1 if not possible).
0, 1, -1, 1, 2, -1, 1, 2, -1, 2, 1, 2, -1, 2, 3, 1, 2, 3, 2, 3, 4, 1, 2, -1, 2, 2, 3, 2, 1, 2, 3, 2, 3, -1, 2, 3, 1, 2, 2, 2, 3, 3, 2, 2, 3, 1, 2, 3, 2, 2, 3, 2, 3, 3, 3, 1, 2, 2, 2, 3, 2, 2, 3, 3, 2, 2, 1, 2, 3, 2, 2, 3, 2, 2, 3, 3, 2, 3, 1, 2, 3, 2, 3, 2, 2, 3, 3, 2, 2, 3, 3, 1, 2, 2, 2, 3, 3, 2, 3, 2, 2, 2, 2, 3, 3, 1, 2, 3, 2, 3, 3, 2, 2, 3, 2, 2, 3, 3, 3, 2, 1, 2, 3
Offset: 0
Keywords
Examples
a(20)=4 since 20=1+3+6+10, a(21)=1 since 21 is triangular, a(22)=2 since 22=1+21, a(23)=-1 since no combination of distinct triangular numbers sum to 23.
Comments