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)
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
A342518
Number of strict integer partitions of n with strictly decreasing first quotients.
Original entry on oeis.org
1, 1, 1, 2, 2, 3, 4, 4, 5, 7, 8, 9, 11, 12, 13, 17, 18, 21, 24, 28, 30, 34, 37, 41, 47, 52, 56, 63, 68, 72, 83, 89, 99, 108, 117, 128, 139, 149, 163, 179, 189, 203, 217, 233, 250, 272, 289, 305, 329, 355, 381, 410, 438, 471, 505, 540, 571, 607, 645, 683, 726
Offset: 0
The strict partition (12,10,6,3,1) has first quotients (5/6,3/5,1/2,1/3) so is counted under a(32), even though the differences (-2,-4,-3,-2) are not strictly decreasing.
The a(1) = 1 through a(13) = 12 partitions (A..D = 10..13):
1 2 3 4 5 6 7 8 9 A B C D
21 31 32 42 43 53 54 64 65 75 76
41 51 52 62 63 73 74 84 85
321 61 71 72 82 83 93 94
431 81 91 92 A2 A3
432 541 A1 B1 B2
531 631 542 543 C1
4321 641 642 652
731 651 742
741 751
831 841
5431
The version for differences instead of quotients is
A320388.
The non-strict ordered version is
A342494.
The strictly increasing version is
A342517.
The weakly decreasing version is
A342519.
A045690 counts sets with maximum n with all adjacent elements y < 2x.
A167865 counts strict chains of divisors > 1 summing to n.
A342096 counts partitions with all adjacent parts x < 2y (strict:
A342097).
A342098 counts (strict) partitions with all adjacent parts x > 2y.
-
Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Greater@@Divide@@@Reverse/@Partition[#,2,1]&]],{n,0,30}]
Showing 1-3 of 3 results.
Comments