[go: up one dir, main page]

login
A240026
Number of partitions of n such that the successive differences of consecutive parts are nondecreasing.
34
1, 1, 2, 3, 5, 6, 10, 12, 16, 21, 27, 32, 43, 50, 60, 75, 90, 103, 128, 146, 170, 203, 234, 264, 315, 355, 402, 467, 530, 589, 684, 764, 851, 969, 1083, 1195, 1360, 1504, 1659, 1863, 2063, 2258, 2531, 2779, 3039, 3379, 3709, 4032, 4474, 4880, 5304, 5846, 6373, 6891, 7578, 8227, 8894, 9727, 10550, 11357, 12405, 13404, 14419
OFFSET
0,3
COMMENTS
Partitions (p(1), p(2), ..., p(m)) such that p(k-1) - p(k-2) <= p(k) - p(k-1) for all k >= 3.
The differences of a sequence are defined as if the sequence were increasing, so for example the differences of (6,3,1) are (-3,-2). Then a(n) is the number of integer partitions of n whose differences are weakly increasing. The Heinz numbers of these partitions are given by A325360. Of course, the number of such integer partitions of n is also the number of reversed integer partitions of n whose differences are weakly increasing, which is the author's interpretation. - Gus Wiseman, May 03 2019
EXAMPLE
There are a(10) = 27 such partitions of 10:
01: [ 1 1 1 1 1 1 1 1 1 1 ]
02: [ 1 1 1 1 1 1 1 1 2 ]
03: [ 1 1 1 1 1 1 1 3 ]
04: [ 1 1 1 1 1 1 4 ]
05: [ 1 1 1 1 1 2 3 ]
06: [ 1 1 1 1 1 5 ]
07: [ 1 1 1 1 2 4 ]
08: [ 1 1 1 1 6 ]
09: [ 1 1 1 2 5 ]
10: [ 1 1 1 7 ]
11: [ 1 1 2 6 ]
12: [ 1 1 3 5 ]
13: [ 1 1 8 ]
14: [ 1 2 3 4 ]
15: [ 1 2 7 ]
16: [ 1 3 6 ]
17: [ 1 9 ]
18: [ 2 2 2 2 2 ]
19: [ 2 2 2 4 ]
20: [ 2 2 6 ]
21: [ 2 3 5 ]
22: [ 2 8 ]
23: [ 3 3 4 ]
24: [ 3 7 ]
25: [ 4 6 ]
26: [ 5 5 ]
27: [ 10 ]
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], OrderedQ[Differences[#]]&]], {n, 0, 30}] (* Gus Wiseman, May 03 2019 *)
PROG
(Ruby)
def partition(n, min, max)
return [[]] if n == 0
[max, n].min.downto(min).flat_map{|i| partition(n - i, min, i).map{|rest| [i, *rest]}}
end
def f(n)
return 1 if n == 0
cnt = 0
partition(n, 1, n).each{|ary|
ary0 = (1..ary.size - 1).map{|i| ary[i - 1] - ary[i]}
cnt += 1 if ary0.sort == ary0.reverse
}
cnt
end
def A240026(n)
(0..n).map{|i| f(i)}
end
p A240026(50) # Seiichi Manyama, Oct 13 2018
CROSSREFS
Cf. A240027 (strictly increasing differences).
Cf. A179255 (distinct parts, nondecreasing), A179254 (distinct parts, strictly increasing).
Sequence in context: A306296 A351717 A191173 * A213212 A341124 A008627
KEYWORD
nonn
AUTHOR
Joerg Arndt, Mar 31 2014
STATUS
approved