A364910
Number of integer partitions of 2n whose distinct parts sum to n.
Original entry on oeis.org
1, 1, 1, 3, 3, 4, 12, 11, 19, 23, 54, 55, 103, 115, 178, 289, 389, 507, 757, 970, 1343, 2033, 2579, 3481, 4840, 6312, 8317, 10998, 15459, 19334, 26368, 33480, 44709, 56838, 74878, 93369, 128109, 157024, 206471, 258357, 338085, 417530, 544263, 669388, 859570, 1082758, 1367068
Offset: 0
The a(0) = 1 through a(7) = 11 partitions:
() (11) (22) (33) (44) (55) (66) (77)
(2211) (3311) (3322) (4422) (4433)
(21111) (311111) (4411) (5511) (5522)
(4111111) (33321) (6611)
(42222) (442211)
(322221) (4222211)
(332211) (4421111)
(3222111) (42221111)
(3321111) (422111111)
(32211111) (611111111)
(51111111) (4211111111)
(321111111)
The a(0) = 1 through a(7) = 11 linear combinations:
0 1*1 1*2 1*3 1*4 1*5 1*6 1*7
0*2+3*1 0*3+4*1 0*4+5*1 0*4+3*2 0*6+7*1
1*2+1*1 1*3+1*1 1*3+1*2 0*5+6*1 1*4+1*3
1*4+1*1 1*4+1*2 1*5+1*2
1*5+1*1 1*6+1*1
0*3+0*2+6*1 0*4+0*2+7*1
0*3+1*2+4*1 0*4+1*2+5*1
0*3+2*2+2*1 0*4+2*2+3*1
0*3+3*2+0*1 0*4+3*2+1*1
1*3+0*2+3*1 1*4+0*2+3*1
1*3+1*2+1*1 1*4+1*2+1*1
2*3+0*2+0*1
The case with no zero coefficients is
A000009.
A version based on Heinz numbers is
A364906.
Using all partitions (not just strict) we get
A364907.
Using strict partitions of any number from 1 to n gives
A365002.
These partitions have ranks
A365003.
-
Table[Length[Select[IntegerPartitions[2n],Total[Union[#]]==n&]],{n,0,15}]
-
a(n) = {my(res = 0); forpart(p = 2*n,s = Set(p); if(vecsum(s) == n, res++)); res} \\ David A. Corneth, Aug 20 2023
-
from sympy.utilities.iterables import partitions
def A364910(n): return sum(1 for d in partitions(n<<1,k=n) if sum(set(d))==n) # Chai Wah Wu, Sep 13 2023
A364907
Number of ways to write n as a nonnegative linear combination of an integer partition of n.
Original entry on oeis.org
1, 1, 4, 13, 50, 179, 696, 2619, 10119, 38867, 150407, 582065, 2260367, 8786919, 34225256, 133471650, 521216494, 2037608462, 7974105052, 31235316275, 122457794193, 480473181271, 1886555402750, 7412471695859, 29142658077266, 114643347181003, 451237737215201
Offset: 0
The a(0) = 1 through a(3) = 13 ways:
0 1*1 1*2 1*3
0*1+2*1 0*2+3*1
1*1+1*1 1*2+1*1
2*1+0*1 0*1+0*1+3*1
0*1+1*1+2*1
0*1+2*1+1*1
0*1+3*1+0*1
1*1+0*1+2*1
1*1+1*1+1*1
1*1+2*1+0*1
2*1+0*1+1*1
2*1+1*1+0*1
3*1+0*1+0*1
The case with no zero coefficients is
A000041.
Using just strict partitions we get
A364910, main diagonal of
A364916.
-
b:= proc(n, i, m) option remember; `if`(n=0, `if`(m=0, 1, 0),
`if`(i<1, 0, b(n, i-1, m)+add(b(n-i, min(i, n-i), m-i*j), j=0..m/i)))
end:
a:= n-> b(n$3):
seq(a(n), n=0..27); # Alois P. Heinz, Jan 28 2024
-
combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
Table[Length[Join@@Table[combs[n,ptn],{ptn,IntegerPartitions[n]}]],{n,0,5}]
A364908
Number of ways to write n as a nonnegative linear combination of an integer composition of n.
Original entry on oeis.org
1, 1, 4, 15, 70, 314, 1542, 7428, 36860, 182911, 917188, 4612480, 23323662, 118273428, 601762636, 3069070533, 15689123386, 80356953555, 412300910566, 2118715503962, 10902791722490, 56175374185014, 289766946825180, 1496239506613985, 7733302967423382
Offset: 0
The a(3) = 15 ways to write 3 as a nonnegative linear combination of an integer composition of 3:
1*3 0*2+3*1 1*1+1*2 0*1+0*1+3*1
1*2+1*1 3*1+0*2 0*1+1*1+2*1
0*1+2*1+1*1
0*1+3*1+0*1
1*1+0*1+2*1
1*1+1*1+1*1
1*1+2*1+0*1
2*1+0*1+1*1
2*1+1*1+0*1
3*1+0*1+0*1
The case with no zero coefficients is
A011782.
A116861 = positive linear combinations of strict ptns of k, reverse
A364916.
A365067 = nonnegative linear combinations of strict partitions of k.
A364912 = positive linear combinations of partitions of k.
A364916 = positive linear combinations of strict partitions of k.
-
b:= proc(n, m) option remember; `if`(n=0, `if`(m=0, 1, 0),
add(add(b(n-i, m-i*j), j=0..m/i), i=1..n))
end:
a:= n-> b(n$2):
seq(a(n), n=0..25); # Alois P. Heinz, Jan 28 2024
-
combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]}, Select[Tuples[s],Total[Times@@@#]==n&]];
Table[Length[Join@@Table[combs[n,ptn],{ptn,Join@@Permutations /@ IntegerPartitions[n]}]],{n,0,5}]
A364909
Number of ways to write n as a nonnegative linear combination of a strict integer composition of n.
Original entry on oeis.org
1, 1, 1, 5, 5, 7, 51, 45, 89, 109, 709, 733, 1495, 1935, 3119, 13785, 16611, 29035, 44611, 68733, 95193, 372897, 435007, 781345, 1177181, 1866659, 2600537, 3906561, 12052631, 14610799, 25407653, 37652265, 59943351, 84060993, 128112805, 172172117, 480353257, 578740011
Offset: 0
The a(0) = 1 through a(5) = 7 ways:
. 1*1 1*2 1*3 1*4 1*5
0*2+3*1 0*3+4*1 0*4+5*1
1*1+1*2 1*1+1*3 1*1+1*4
1*2+1*1 1*3+1*1 1*2+1*3
3*1+0*2 4*1+0*3 1*3+1*2
1*4+1*1
5*1+0*4
The case with no zero coefficients is
A032020.
-
combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
Table[Length[Join@@Table[combs[n,ptn],{ptn,Join@@Permutations/@Select[IntegerPartitions[n],UnsameQ@@#&]}]],{n,0,5}]
-
from math import factorial
from sympy.utilities.iterables import partitions
def A364909(n):
if n == 0: return 1
aset = tuple(set(p) for p in partitions(n) if max(p.values(),default=0)==1)
return sum(factorial(len(t)) for p in partitions(n) for t in aset if set(p).issubset(t)) # Chai Wah Wu, Sep 21 2023
A365003
Heinz numbers of integer partitions where the sum of all parts is twice the sum of distinct parts.
Original entry on oeis.org
1, 4, 9, 25, 36, 48, 49, 100, 121, 160, 169, 196, 225, 289, 361, 441, 448, 484, 529, 567, 676, 750, 810, 841, 900, 961, 1080, 1089, 1156, 1200, 1225, 1369, 1408, 1440, 1444, 1521, 1681, 1764, 1849, 1920, 2116, 2209, 2268, 2352, 2601, 2809, 3024, 3025, 3159
Offset: 1
The prime indices of 750 are {1,2,3,3,3}, with sum 12, while the distinct prime indices {1,2,3} have sum 6, so 750 is in the sequence.
The terms together with their prime indices begin:
1: {}
4: {1,1}
9: {2,2}
25: {3,3}
36: {1,1,2,2}
48: {1,1,1,1,2}
49: {4,4}
100: {1,1,3,3}
121: {5,5}
160: {1,1,1,1,1,3}
169: {6,6}
196: {1,1,4,4}
225: {2,2,3,3}
289: {7,7}
361: {8,8}
441: {2,2,4,4}
448: {1,1,1,1,1,1,4}
The LHS is
A056239 (sum of prime indices).
Partitions of this type are counted by
A364910.
A116861 counts partitions by sum and sum of distinct parts.
-
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Select[Range[1000],Total[prix[#]]==2*Total[Union[prix[#]]]&]
Showing 1-5 of 5 results.
Comments