OFFSET
1,2
COMMENTS
46 is the smallest number that can be expressed as the sum of distinct triangular numbers in five ways, but 49 is the smallest that can be so expressed in _exactly_ five ways. There are further examples of this phenomenon.
EXAMPLE
25 = 1 + 3 + 6 + 15 = 10 + 15 = 1 + 3 + 21. This is the smallest number that can be written as the sum of distinct triangular numbers in three different ways. So a(3)=25.
The first null values of a(n) occur for n = 25, 32, 37, 47, 51, 52, 54, 61,... - Giovanni Resta, Jun 08 2016
MATHEMATICA
nT[n_, m_: 0] := nT[n, m] = If[n == 0, 1, Block[{t, i=m+1, s=0}, While[(t = i*(i+1)/2) <= n, s += nT[n-t, i]; i++]; s]]; a[n_] := Block[{k=0, t}, While[(t = nT[++k]) != n && t < Max[2*n, 30]]; If[t == n, k, 0]]; Array[a, 57] (* Giovanni Resta, Jun 08 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Phil Scovis, Jun 07 2016
EXTENSIONS
a(15)-a(20) from Tom Edgar, Jun 08 2016
a(21)-a(57) from Giovanni Resta, Jun 08 2016
STATUS
approved