%I #33 Oct 27 2023 19:21:23
%S 1,1,0,1,1,0,1,1,0,1,2,1,0,1,1,1,2,1,1,2,1,2,2,0,2,3,1,1,3,2,1,4,3,0,
%T 3,3,2,4,3,3,3,2,3,3,2,4,6,4,2,5,4,2,6,5,3,7,6,3,5,5,5,6,5,4,7,7,6,8,
%U 6,5,9,7,4,9,9,6,10,9,4,9,10,8,11,11,9,10,10,9,10,10,9,14,14,7,14,14,7,15,15,8,15,17,13
%N Number of partitions of n into distinct triangular numbers.
%H Alois P. Heinz, <a href="/A024940/b024940.txt">Table of n, a(n) for n = 0..10000</a> (first 1001 terms from T. D. Noe)
%F For n>0: a(n) = b(n, 1) where b(n, k) = if n>k*(k+1)/2 then b(n-k*(k+1)/2, k+1) + b(n, k+1) else (if n=k*(k+1)/2 then 1 else 0). - _Reinhard Zumkeller_, Aug 26 2003
%F a(n) ~ exp(3*Pi^(1/3) * ((sqrt(2)-1)*Zeta(3/2))^(2/3) * n^(1/3) / 2^(4/3)) * ((sqrt(2)-1)*Zeta(3/2))^(1/3) / (2^(5/3) * sqrt(3) * Pi^(1/3) * n^(5/6)). - _Vaclav Kotesovec_, Jan 02 2017
%F G.f.: prod_{i>=1} (1+x^A000217(i)). - _R. J. Mathar_, Sep 20 2020
%e a(31) counts these partitions: [28,3], [21,10], [21,6,3,1], [15,10,6] _Clark Kimberling_, Mar 09 2014
%t Drop[ CoefficientList[ Series[ Product[(1 + x^(k*(k + 1)/2)), {k, 1, 15}], {x, 0, 102}], x], 1]
%t (* also *)
%t t = Table[n (n + 1)/2, {n, 1, 200}] ; p[n_] := IntegerPartitions[n, All, t]; Table[p[n], {n, 0, 12}] (*shows unrestricted partitions*)
%t d[n_] := Select[p[n], Max[Length /@ Split@#] == 1 &]; Table[d[n], {n, 1, 31}] (*shows strict partitions*)
%t Table[Length[d[n]], {n, 1, 70}] (* _Clark Kimberling_, Mar 09 2014 *)
%t nmax = 100; nn = Floor[Sqrt[8*nmax + 1]/2] + 1; poly = ConstantArray[0, nn*(nn+1)/2 + 1]; poly[[1]] = 1; poly[[2]] = 1; Do[Do[poly[[j + 1]] += poly[[j - k*(k+1)/2 + 1]], {j, nn*(nn+1)/2, k*(k+1)/2, -1}];, {k, 2, nn}]; Take[poly, nmax + 1] (* _Vaclav Kotesovec_, Dec 10 2016 *)
%o (Haskell)
%o a024940 = p $ tail a000217_list where
%o p _ 0 = 1
%o p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
%o -- _Reinhard Zumkeller_, Jun 28 2013
%Y Cf. A000217, A033461, A007294, A280366.
%K nonn
%O 0,11
%A _Clark Kimberling_