Smallest number of distinct triangular numbers which sum to n (or -1 if not possible).

A061337

Smallest number of distinct triangular numbers which sum to n (or -1 if not possible).

Terms

    a(0) =0a(1) =1a(2) =-1a(3) =1a(4) =2a(5) =-1a(6) =1a(7) =2a(8) =-1a(9) =2a(10) =1a(11) =2a(12) =-1a(13) =2a(14) =3a(15) =1a(16) =2a(17) =3a(18) =2a(19) =3a(20) =4a(21) =1a(22) =2a(23) =-1a(24) =2a(25) =2a(26) =3a(27) =2a(28) =1a(29) =2

External references