login
A320510
Number of partitions of n such that the successive differences of consecutive parts are decreasing, and first difference < first part.
7
1, 1, 2, 1, 2, 2, 2, 2, 4, 2, 3, 4, 3, 4, 6, 3, 5, 6, 5, 6, 9, 5, 7, 9, 8, 8, 11, 8, 11, 13, 10, 12, 15, 11, 15, 16, 14, 16, 21, 15, 20, 22, 18, 21, 26, 21, 24, 28, 25, 28, 33, 26, 32, 34, 33, 36, 40, 34, 40, 45, 40, 43, 49, 43, 52, 54, 49, 54, 62, 56, 62, 64, 61, 67, 75, 66
OFFSET
0,3
COMMENTS
Partitions are usually written with parts in descending order, but the conditions are easier to check visually if written in ascending order.
The differences of a sequence are defined as if the sequence were increasing, so for example the differences of (6,3,1) (with the last part taken to be 0) are (-3,-2,-1). Then a(n) is the number of integer partitions of n whose differences (with the last part taken to be 0) are strictly decreasing. The Heinz numbers of these partitions are given by A325461. Of course, the number of such integer partitions of n is also the number of reversed integer partitions of n whose differences are strictly decreasing, which is the author's interpretation. - Gus Wiseman, May 04 2019
EXAMPLE
There are a(29) = 13 such partitions of 29:
01: [29]
02: [10, 19]
03: [11, 18]
04: [12, 17]
05: [13, 16]
06: [14, 15]
07: [6, 10, 13]
08: [6, 11, 12]
09: [7, 10, 12]
10: [7, 11, 11]
11: [8, 10, 11]
12: [9, 10, 10]
13: [4, 7, 9, 9]
There are a(30) = 10 such partitions of 30:
01: [30]
02: [11, 19]
03: [12, 18]
04: [13, 17]
05: [14, 16]
06: [15, 15]
07: [6, 11, 13]
08: [7, 11, 12]
09: [8, 11, 11]
10: [4, 7, 9, 10]
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], Greater@@Differences[Append[#, 0]]&]], {n, 0, 30}] (* Gus Wiseman, May 04 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|
ary << 0
ary0 = (1..ary.size - 1).map{|i| ary[i - 1] - ary[i]}
cnt += 1 if ary0.sort == ary0 && ary0.uniq == ary0
}
cnt
end
def A320510(n)
(0..n).map{|i| f(i)}
end
p A320510(50)
CROSSREFS
Cf. A320385 (distinct parts, decreasing, and first difference < first part).
Sequence in context: A339660 A104659 A077197 * A117173 A241061 A103858
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Oct 14 2018
STATUS
approved