login
A179254
Number of partitions of n into distinct parts such that the successive differences of consecutive parts are strictly increasing.
14
1, 1, 1, 2, 2, 3, 3, 5, 5, 6, 8, 9, 9, 13, 14, 15, 19, 21, 22, 28, 30, 32, 39, 42, 44, 54, 58, 61, 72, 77, 82, 96, 102, 108, 124, 133, 141, 160, 171, 180, 203, 218, 230, 256, 273, 289, 320, 342, 361, 395, 423, 447, 486, 520, 548, 594, 635, 669, 721, 769, 811, 871, 928, 978, 1044, 1114
OFFSET
0,4
COMMENTS
Partitions into distinct parts (p(1), p(2), ..., p(m)) such that p(k-1) - p(k-2) < p(k) - p(k-1) for all k >= 3.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000 (first 225 terms from Joerg Arndt)
EXAMPLE
There are a(17) = 21 such partitions of 17:
01: [ 1 2 4 10 ]
02: [ 1 2 5 9 ]
03: [ 1 2 14 ]
04: [ 1 3 13 ]
05: [ 1 4 12 ]
06: [ 1 5 11 ]
07: [ 1 16 ]
08: [ 2 3 12 ]
09: [ 2 4 11 ]
10: [ 2 5 10 ]
11: [ 2 15 ]
12: [ 3 4 10 ]
13: [ 3 5 9 ]
14: [ 3 14 ]
15: [ 4 5 8 ]
16: [ 4 13 ]
17: [ 5 12 ]
18: [ 6 11 ]
19: [ 7 10 ]
20: [ 8 9 ]
21: [ 17 ]
- Joerg Arndt, Mar 31 2014
PROG
(Sage)
def A179254(n):
has_increasing_diffs = lambda x: min(differences(x, 2)) >= 1
allowed = lambda x: len(x) < 3 or has_increasing_diffs(x)
return len([x for x in Partitions(n, max_slope=-1) if allowed(x[::-1])])
# D. S. McNeil, Jan 06 2011
(Ruby)
def partition(n, min, max)
return [[]] if n == 0
[max, n].min.downto(min).flat_map{|i| partition(n - i, min, i - 1).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 && ary0.uniq == ary0
}
cnt
end
def A179254(n)
(0..n).map{|i| f(i)}
end
p A179254(50) # Seiichi Manyama, Oct 12 2018
CROSSREFS
Cf. A007294, A179255 (nondecreasing differences), A179269, A320382, A320385.
Cf. A240026 (partitions with nondecreasing differences), A240027 (partitions with strictly increasing differences).
Sequence in context: A240542 A342516 A325391 * A304430 A086609 A341140
KEYWORD
nonn
AUTHOR
Joerg Arndt, Jan 05 2011
STATUS
approved