%I #16 Dec 13 2015 01:02:01
%S 1,1,2,3,4,5,8,8,12,14,18,21,29,29,40,47,56,62,83,86,111,124,146,166,
%T 207,217,267,300,352,389,471,505,604,668,772,860,1015,1085,1279,1419,
%U 1622,1780,2072,2242,2595,2858,3231,3563,4092,4421,5057,5557,6250
%N Number of partitions of n in which the sequence of frequencies of the summands is nonincreasing.
%H Alois P. Heinz, <a href="/A100882/b100882.txt">Table of n, a(n) for n = 0..1000</a>
%e a(4) = 4 because in each of the partitions 4, 3+1, 2+2, 1+1+1+1, the frequencies of the summands is nonincreasing as the summands decrease. The partition 2+1+1 is not counted because 2 is used once, but 1 is used twice.
%p b:= proc(n,i,t) option remember;
%p if n<0 then 0
%p elif n=0 then 1
%p elif i=1 then `if`(n<=t, 1, 0)
%p elif i=0 then 0
%p else b(n, i-1, t)
%p +add(b(n-i*j, i-1, j), j=1..min(t, floor(n/i)))
%p fi
%p end:
%p a:= n-> b(n, n, n):
%p seq(a(n), n=0..60); # _Alois P. Heinz_, Feb 21 2011
%t b[n_, i_, t_] := b[n, i, t] = Which[n<0, 0, n == 0, 1, i == 1, If[n <= t, 1, 0], i == 0, 0, True, b[n, i-1, t] + Sum[b[n-i*j, i-1, j], {j, 1, Min[t, Floor[n/i]]}]]; a[n_] := b[n, n, n]; Table[a[n], {n, 0, 60}] (* _Jean-François Alcover_, Oct 26 2015, after _Alois P. Heinz_ *)
%Y Cf. A100881, A100883, A100884.
%K nonn
%O 0,3
%A _David S. Newman_, Nov 21 2004
%E More terms from _Alois P. Heinz_, Feb 21 2011
|