A320387
Number of partitions of n into distinct parts such that the successive differences of consecutive parts are nonincreasing, and first difference <= first part.
Original entry on oeis.org
1, 1, 1, 2, 1, 2, 3, 2, 2, 4, 3, 4, 5, 3, 5, 7, 4, 7, 8, 6, 8, 11, 7, 9, 13, 9, 11, 16, 12, 15, 18, 13, 17, 20, 17, 21, 24, 19, 24, 30, 22, 28, 34, 26, 34, 38, 30, 37, 43, 37, 42, 48, 41, 50, 58, 48, 55, 64, 53, 64, 71, 59, 73, 81, 69, 79, 89, 79, 90, 101, 87, 100, 111
Offset: 0
There are a(29) = 15 such partitions of 29:
01: [29]
02: [10, 19]
03: [11, 18]
04: [12, 17]
05: [13, 16]
06: [14, 15]
07: [5, 10, 14]
08: [6, 10, 13]
09: [6, 11, 12]
10: [7, 10, 12]
11: [8, 10, 11]
12: [3, 6, 9, 11]
13: [5, 7, 8, 9]
14: [2, 4, 6, 8, 9]
15: [3, 5, 6, 7, 8]
There are a(30) = 18 such partitions of 30:
01: [30]
02: [10, 20]
03: [11, 19]
04: [12, 18]
05: [13, 17]
06: [14, 16]
07: [5, 10, 15]
08: [6, 10, 14]
09: [6, 11, 13]
10: [7, 10, 13]
11: [7, 11, 12]
12: [8, 10, 12]
13: [3, 6, 9, 12]
14: [9, 10, 11]
15: [4, 7, 9, 10]
16: [2, 4, 6, 8, 10]
17: [6, 7, 8, 9]
18: [4, 5, 6, 7, 8]
A053632 counts compositions by weighted sum.
-
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
Table[Length[Select[Range[2^n],ots[prix[#]]==n&]],{n,10}] (* Gus Wiseman, Jan 17 2023 *)
-
seq(n)={Vec(sum(k=1, (sqrtint(8*n+1)+1)\2, my(t=binomial(k,2)); x^t/prod(j=1, k-1, 1 - x^(t-binomial(j,2)) + O(x^(n-t+1)))))} \\ Andrew Howroyd, Jan 22 2023
-
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|
ary << 0
ary0 = (1..ary.size - 1).map{|i| ary[i - 1] - ary[i]}
cnt += 1 if ary0.sort == ary0
}
cnt
end
def A320387(n)
(0..n).map{|i| f(i)}
end
p A320387(50)
A240026
Number of partitions of n such that the successive differences of consecutive parts are nondecreasing.
Original entry on oeis.org
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
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 ]
Cf.
A240027 (strictly increasing differences).
Cf.
A179255 (distinct parts, nondecreasing),
A179254 (distinct parts, strictly increasing).
-
Table[Length[Select[IntegerPartitions[n],OrderedQ[Differences[#]]&]],{n,0,30}] (* Gus Wiseman, May 03 2019 *)
-
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
A240027
Number of partitions of n such that the successive differences of consecutive parts are strictly increasing.
Original entry on oeis.org
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
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 ]
Cf.
A240026 (nondecreasing differences).
Cf.
A179255 (distinct parts, nondecreasing),
A179254 (distinct parts, strictly increasing).
-
Table[Length[Select[IntegerPartitions[n],Less@@Differences[#]&]],{n,0,30}] (* Gus Wiseman, May 03 2019 *)
-
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
A179269
Number of partitions of n into distinct parts such that the successive differences of consecutive parts are increasing, and first difference > first part.
Original entry on oeis.org
1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 5, 5, 5, 7, 7, 7, 10, 10, 10, 13, 14, 14, 18, 19, 19, 23, 25, 25, 30, 32, 33, 38, 41, 42, 48, 52, 54, 60, 65, 67, 75, 81, 84, 92, 99, 103, 113, 121, 126, 136, 147, 153, 165, 177, 184, 197, 213, 221, 236, 253, 264, 280, 301, 313, 331, 355, 371, 390, 418, 435, 458
Offset: 0
a(10) = 5 as there are 5 such partitions of 10: 1 + 3 + 6 = 1 + 9 = 2 + 8 = 3 + 7 = 10.
a(10) = 5 as there are 5 such partitions of 10: 10, 8 + 1 + 1, 6 + 2 + 2, 4 + 3 + 3, 3 + 2 + 2 + 1 + 1 + 1 (second definition).
From _Gus Wiseman_, May 04 2019: (Start)
The a(3) = 1 through a(13) = 7 partitions whose differences are strictly increasing (with the last part taken to be 0) are the following (A = 10, B = 11, C = 12, D = 13). The Heinz numbers of these partitions are given by A325460.
(3) (4) (5) (6) (7) (8) (9) (A) (B) (C) (D)
(31) (41) (51) (52) (62) (72) (73) (83) (93) (94)
(61) (71) (81) (82) (92) (A2) (A3)
(91) (A1) (B1) (B2)
(631) (731) (831) (C1)
(841)
(931)
The a(3) = 1 through a(11) = 5 partitions whose multiplicities form an initial interval of positive integers are the following (A = 10, B = 11). The Heinz numbers of these partitions are given by A307895.
(3) (4) (5) (6) (7) (8) (9) (A) (B)
(211) (311) (411) (322) (422) (522) (433) (533)
(511) (611) (711) (622) (722)
(811) (911)
(322111) (422111)
(End)
-
Table[Length@
Select[IntegerPartitions[n],
And @@ Equal[Range[Length[Split[#]]], Length /@ Split[#]] &], {n,
0, 40}] (* Olivier Gérard, Jul 28 2017 *)
Table[Length[Select[IntegerPartitions[n],Less@@Differences[Append[#,0]]&]],{n,0,30}] (* Gus Wiseman, May 04 2019 *)
-
R(n)={my(L=List(), v=vectorv(n, i, 1), w=1, t=1); while(v, listput(L,v); w++; t+=w; v=vectorv(n, i, sum(k=1, (i-1)\t, L[w-1][i-k*t]))); Mat(L)}
seq(n)={my(M=R(n)); concat([1], vector(n, i, vecsum(M[i,])))} \\ Andrew Howroyd, Aug 27 2019
-
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|
ary << 0
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 A179269(n)
(0..n).map{|i| f(i)}
end
p A179269(50) # Seiichi Manyama, Oct 12 2018
-
def A179269(n):
has_increasing_diffs = lambda x: min(differences(x,2)) >= 1
special = lambda x: (x[1]-x[0]) > x[0]
allowed = lambda x: (len(x) < 2 or special(x)) and (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
A325547
Number of compositions of n with strictly increasing differences.
Original entry on oeis.org
1, 1, 2, 3, 6, 8, 11, 18, 24, 30, 45, 57, 71, 96, 120, 148, 192, 235, 286, 354, 431, 518, 628, 752, 893, 1063, 1262, 1482, 1744, 2046, 2386, 2775, 3231, 3733, 4305, 4977, 5715, 6536, 7507, 8559, 9735, 11112, 12608, 14252, 16177, 18265, 20553, 23204, 26090, 29223
Offset: 0
The a(1) = 1 through a(6) = 11 compositions:
(1) (2) (3) (4) (5) (6)
(11) (12) (13) (14) (15)
(21) (22) (23) (24)
(31) (32) (33)
(112) (41) (42)
(211) (113) (51)
(212) (114)
(311) (213)
(312)
(411)
(2112)
Cf.
A000079,
A000740,
A008965,
A034297,
A070211,
A175342,
A179269,
A179254,
A240027,
A325545,
A325546,
A325548,
A325552,
A325557.
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Less@@Differences[#]&]],{n,0,15}]
-
\\ Row sums of R(n) give A179269 (breakdown by width)
R(n)={my(L=List(), v=vectorv(n, i, 1), w=1, t=1); while(v, listput(L,v); w++; t+=w; v=vectorv(n, i, sum(k=1, (i-1)\t, v[i-k*t]))); Mat(L)}
seq(n)={my(M=R(n)); Vec(1 + sum(i=1, n, my(p=sum(w=1, min(#M,n\i), x^(w*i)*sum(j=1, n-i*w, x^j*M[j,w]))); x^i*(1 + x^i)*(1 + p + O(x*x^(n-i)))^2))} \\ Andrew Howroyd, Aug 27 2019
A325548
Number of compositions of n with strictly decreasing differences.
Original entry on oeis.org
1, 1, 2, 3, 5, 8, 10, 13, 19, 23, 29, 38, 46, 55, 69, 80, 96, 115, 132, 154, 183, 207, 238, 276, 314, 356, 405, 455, 513, 579, 647, 724, 809, 897, 998, 1107, 1225, 1350, 1486, 1639, 1805, 1973, 2166, 2374, 2586, 2824, 3084, 3346, 3646, 3964, 4286, 4655, 5047
Offset: 0
The a(1) = 1 through a(8) = 19 compositions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (12) (13) (14) (15) (16) (17)
(21) (22) (23) (24) (25) (26)
(31) (32) (33) (34) (35)
(121) (41) (42) (43) (44)
(122) (51) (52) (53)
(131) (132) (61) (62)
(221) (141) (133) (71)
(231) (142) (134)
(1221) (151) (143)
(232) (152)
(241) (161)
(331) (233)
(242)
(251)
(332)
(341)
(431)
(1331)
Cf.
A011782,
A000740,
A008965,
A070211,
A175342,
A179254,
A320470,
A325457,
A325545,
A325546,
A325547,
A325552,
A325557.
-
b:= proc(n, l, d) option remember; `if`(n=0, 1, add(`if`(l=0 or
j-l b(n, 0$2):
seq(a(n), n=0..52); # Alois P. Heinz, Jan 27 2024
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Greater@@Differences[#]&]],{n,0,15}]
A179255
Number of partitions of n into distinct parts such that the successive differences of consecutive parts are nondecreasing.
Original entry on oeis.org
1, 1, 1, 2, 2, 3, 4, 5, 5, 8, 9, 10, 13, 15, 16, 22, 24, 26, 33, 36, 39, 50, 54, 58, 70, 77, 83, 100, 109, 116, 137, 150, 159, 186, 202, 216, 249, 270, 288, 328, 355, 379, 428, 462, 491, 554, 597, 633, 707, 760, 807, 899, 964, 1020, 1127, 1211, 1282, 1412, 1512, 1596, 1750, 1873, 1976, 2160, 2305, 2434, 2652, 2826, 2978
Offset: 0
There are a(17) = 26 such partitions of 17:
01: [ 1 2 3 4 7 ]
02: [ 1 2 3 11 ]
03: [ 1 2 4 10 ] *
04: [ 1 2 5 9 ] *
05: [ 1 2 14 ] *
06: [ 1 3 5 8 ]
07: [ 1 3 13 ] *
08: [ 1 4 12 ] *
09: [ 1 5 11 ] *
10: [ 1 16 ] *
11: [ 2 3 4 8 ]
12: [ 2 3 5 7 ]
13: [ 2 3 12 ] *
14: [ 2 4 11 ] *
15: [ 2 5 10 ] *
16: [ 2 15 ] *
17: [ 3 4 10 ] *
18: [ 3 5 9 ] *
19: [ 3 14 ] *
20: [ 4 5 8 ] *
21: [ 4 13 ] *
22: [ 5 12 ] *
23: [ 6 11 ] *
24: [ 7 10 ] *
25: [ 8 9 ] *
26: [ 17 ] *
The 21 partitions marked with * have strictly increasing differences, see the example for A179254.
- _Joerg Arndt_, Mar 31 2014
Cf.
A240026 (partitions with nondecreasing differences),
A240027 (partitions with strictly increasing differences),
A320382.
-
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
}
cnt
end
def A179255(n)
(0..n).map{|i| f(i)}
end
p A179255(50) # Seiichi Manyama, Oct 12 2018
-
def A179255(n):
has_nondecreasing_diffs = lambda x: min(differences(x,2)) >= 0
allowed = lambda x: len(x) < 3 or has_nondecreasing_diffs(x)
return len([x for x in Partitions(n,max_slope=-1) if allowed(x[::-1])])
# D. S. McNeil, Jan 06 2011
A325391
Number of reversed integer partitions of n whose k-th differences are strictly increasing for all k >= 0.
Original entry on oeis.org
1, 1, 1, 2, 2, 3, 3, 5, 5, 6, 8, 9, 9, 13, 13, 15, 19, 20, 20, 28, 28, 30, 36, 40, 40, 50, 50, 56, 64, 68, 68, 86, 86, 92, 102, 112, 114, 133, 133, 146, 158, 173, 173, 202, 202, 215, 237, 256, 256, 287, 287, 324, 340, 359, 359, 403, 423, 446, 464, 495, 495
Offset: 0
The a(1) = 1 through a(9) = 6 reversed partitions:
(1) (2) (3) (4) (5) (6) (7) (8) (9)
(12) (13) (14) (15) (16) (17) (18)
(23) (24) (25) (26) (27)
(34) (35) (36)
(124) (125) (45)
(126)
The smallest reversed strict partition with strictly increasing differences not counted by this sequence is (1,2,4,7), whose first and second differences are (1,2,3) and (1,1) respectively.
Cf.
A179254,
A240026,
A325353,
A325354,
A325357,
A325393,
A325395,
A325398,
A325404,
A325406,
A325456,
A325468.
-
Table[Length[Select[Reverse/@IntegerPartitions[n],And@@Table[Less@@Differences[#,k],{k,0,Length[#]}]&]],{n,0,30}]
A320385
Number of partitions of n into distinct parts such that the successive differences of consecutive parts are decreasing, and first difference < first part.
Original entry on oeis.org
1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 3, 2, 3, 4, 3, 3, 5, 3, 5, 6, 4, 5, 7, 5, 7, 8, 6, 7, 10, 8, 9, 11, 8, 11, 13, 9, 13, 15, 12, 14, 17, 13, 16, 20, 15, 18, 22, 18, 21, 25, 20, 23, 27, 23, 28, 30, 26, 30, 34, 30, 33, 38, 31, 38, 43, 36, 42, 46, 42, 47, 50, 45, 50, 58, 51, 55
Offset: 0
There are a(29) = 10 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: [8, 10, 11]
There are a(30) = 8 such partitions of 30:
01: [30]
02: [11, 19]
03: [12, 18]
04: [13, 17]
05: [14, 16]
06: [6, 11, 13]
07: [7, 11, 12]
08: [4, 7, 9, 10]
-
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|
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 A320385(n)
(0..n).map{|i| f(i)}
end
p A320385(50)
A342530
Number of strict chains of divisors ending with n and having distinct first quotients.
Original entry on oeis.org
1, 2, 2, 3, 2, 6, 2, 6, 3, 6, 2, 12, 2, 6, 6, 9, 2, 12, 2, 12, 6, 6, 2, 28, 3, 6, 6, 12, 2, 26, 2, 14, 6, 6, 6, 31, 2, 6, 6, 28, 2, 26, 2, 12, 12, 6, 2, 52, 3, 12, 6, 12, 2, 28, 6, 28, 6, 6, 2, 66, 2, 6, 12, 25, 6, 26, 2, 12, 6, 26, 2, 76, 2, 6, 12, 12, 6, 26
Offset: 1
The a(1) = 1 through a(12) = 12 chains (reversed):
1 2 3 4 5 6 7 8 9 10 11 12
2/1 3/1 4/1 5/1 6/1 7/1 8/1 9/1 10/1 11/1 12/1
4/2 6/2 8/2 9/3 10/2 12/2
6/3 8/4 10/5 12/3
6/2/1 8/2/1 10/2/1 12/4
6/3/1 8/4/1 10/5/1 12/6
12/2/1
12/3/1
12/4/1
12/4/2
12/6/1
12/6/2
Not counted under a(12) are: 12/4/2/1, 12/6/2/1, 12/6/3, 12/6/3/1.
The version for weakly increasing first quotients is
A057567.
The version for equal first quotients is
A169594.
The case of chains starting with 1 is
A254578.
The version for strictly increasing first quotients is
A342086.
A067824 counts strict chains of divisors ending with n.
A167865 counts strict chains of divisors > 1 summing to n.
A253249 counts strict chains of divisors.
A334997 counts chains of divisors of n by length.
A342515/
A342520 count strict partitions with equal/distinct quotients.
-
cmi[n_]:=Prepend[Prepend[#,n]&/@Join@@cmi/@Most[Divisors[n]],{n}];
Table[Length[Select[cmi[n],UnsameQ@@Divide@@@Partition[#,2,1]&]],{n,100}]
Showing 1-10 of 13 results.
Comments