A240026 Number of partitions of n such that the successive differences of consecutive parts are nondecreasing.
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
Keywords
Examples
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 ]
Links
- Fausto A. C. Cariboni, Table of n, a(n) for n = 0..500 (terms 0..203 from Joerg Arndt)
- Gus Wiseman, Sequences counting and ranking integer partitions by the differences of their successive parts.
Crossrefs
Programs
-
Mathematica
Table[Length[Select[IntegerPartitions[n],OrderedQ[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.reverse } cnt end def A240026(n) (0..n).map{|i| f(i)} end p A240026(50) # Seiichi Manyama, Oct 13 2018
Comments