A240027 Number of partitions of n such that the successive differences of consecutive parts are strictly increasing.
1, 1, 2, 2, 4, 4, 5, 7, 9, 9, 13, 14, 16, 20, 23, 25, 32, 34, 38, 45, 51, 55, 65, 70, 77, 89, 99, 106, 122, 131, 143, 161, 177, 189, 211, 229, 248, 272, 298, 317, 349, 378, 406, 440, 479, 511, 554, 597, 640, 686, 744, 792, 850, 913, 973, 1039, 1122, 1189, 1268, 1358, 1444, 1532, 1646, 1742, 1847, 1975, 2094, 2210, 2366
Offset: 0
Keywords
Examples
There are a(15) = 25 such partitions of 15: 01: [ 1 1 2 4 7 ] 02: [ 1 1 2 11 ] 03: [ 1 1 3 10 ] 04: [ 1 1 4 9 ] 05: [ 1 1 13 ] 06: [ 1 2 4 8 ] 07: [ 1 2 12 ] 08: [ 1 3 11 ] 09: [ 1 4 10 ] 10: [ 1 14 ] 11: [ 2 2 3 8 ] 12: [ 2 2 4 7 ] 13: [ 2 2 11 ] 14: [ 2 3 10 ] 15: [ 2 4 9 ] 16: [ 2 13 ] 17: [ 3 3 9 ] 18: [ 3 4 8 ] 19: [ 3 12 ] 20: [ 4 4 7 ] 21: [ 4 11 ] 22: [ 5 10 ] 23: [ 6 9 ] 24: [ 7 8 ] 25: [ 15 ]
Links
- Fausto A. C. Cariboni, Table of n, a(n) for n = 0..800 (terms 0..260 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],Less@@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 && ary0.uniq == ary0 } cnt end def A240027(n) (0..n).map{|i| f(i)} end p A240027(50) # Seiichi Manyama, Oct 13 2018
Comments