A320470 Number of partitions of n such that the successive differences of consecutive parts are strictly decreasing.
1, 1, 2, 2, 3, 4, 4, 5, 7, 6, 8, 10, 10, 11, 14, 13, 16, 19, 18, 20, 25, 23, 27, 31, 30, 34, 39, 37, 42, 48, 47, 50, 59, 56, 63, 70, 68, 74, 83, 82, 89, 97, 97, 104, 116, 113, 123, 133, 133, 142, 155, 153, 166, 178, 178, 189, 204, 204, 218, 232, 235, 247, 265, 265, 283, 299
Offset: 0
Keywords
Examples
There are a(10) = 8 such partitions of 10: 01: [10] 02: [1, 9] 03: [2, 8] 04: [3, 7] 05: [4, 6] 06: [5, 5] 07: [1, 4, 5] 08: [2, 4, 4] There are a(11) = 10 such partitions of 11: 01: [11] 02: [1, 10] 03: [2, 9] 04: [3, 8] 05: [4, 7] 06: [5, 6] 07: [1, 4, 6] 08: [1, 5, 5] 09: [2, 4, 5] 10: [3, 4, 4]
Links
- Fausto A. C. Cariboni, Table of n, a(n) for n = 0..2000
- Gus Wiseman, Sequences counting and ranking integer partitions by the differences of their successive parts.
Programs
-
Mathematica
Table[Length[Select[IntegerPartitions[n],Greater@@Differences[#]&]],{n,0,30}] (* Gus Wiseman, May 03 2019 *)
-
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 && ary0.uniq == ary0 } cnt end def A320470(n) (0..n).map{|i| f(i)} end p A320470(50)
Comments