|
|
A100881
|
|
Number of partitions of n in which the sequence of frequencies of the summands is decreasing.
|
|
13
|
|
|
1, 1, 2, 2, 3, 3, 4, 4, 6, 5, 7, 8, 8, 9, 13, 10, 13, 15, 16, 18, 21, 17, 24, 28, 26, 26, 36, 32, 38, 42, 40, 46, 52, 48, 63, 63, 59, 63, 85, 77, 81, 92, 89, 102, 116, 98, 122, 134, 130, 140, 157, 145, 165, 182, 190, 191, 207, 195, 235, 259, 232, 252, 293, 279
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
EXAMPLE
|
a(7) = 4 because in each of the four partitions [7], [3,3,1], [2,2,2,1], [1,1,1,1,1,1,1] the frequency with which a summand is used decreases as the summand decreases.
|
|
MAPLE
|
b:= proc(n, i, t) option remember;
if n<0 then 0
elif n=0 then 1
elif i=0 then 0
else b(n, i-1, t)
+add(b(n-i*j, i-1, j), j=1..min(t-1, floor(n/i)))
fi
end:
a:= n-> b(n, n, n+1):
|
|
MATHEMATICA
|
b[n_, i_, t_] := b[n, i, t] = Which[n<0, 0, n==0, 1, i==0, 0, True, b[n, i-1, t] + Sum[b[n-i*j, i-1, j], {j, 1, Min[t-1, Floor[n/i]]}]]; a[n_] := b[n, n, n+1]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Jul 15 2015, after Alois P. Heinz *)
|
|
PROG
|
(Haskell)
a100881 = p 0 0 1 where
p m m' k x | x == 0 = if m > m' || m == 0 then 1 else 0
| x < k = 0
| m == 0 = p 1 m' k (x - k) + p 0 m' (k + 1) x
| otherwise = p (m + 1) m' k (x - k) +
if m > m' then p 0 m (k + 1) x else 0
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|