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
LINKS
Fausto A. C. Cariboni, Table of n, a(n) for n = 0..500 (terms 0..203 from Joerg Arndt)
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).
KEYWORD
nonn
AUTHOR
Joerg Arndt, Mar 31 2014
STATUS
approved