A051424
Number of partitions of n into pairwise relatively prime parts.
Original entry on oeis.org
1, 1, 2, 3, 4, 6, 7, 10, 12, 15, 18, 23, 27, 33, 38, 43, 51, 60, 70, 81, 92, 102, 116, 134, 153, 171, 191, 211, 236, 266, 301, 335, 367, 399, 442, 485, 542, 598, 649, 704, 771, 849, 936, 1023, 1103, 1185, 1282, 1407, 1535, 1662, 1790, 1917, 2063, 2245, 2436
Offset: 0
a(4) = 4 since all partitions of 4 consist of relatively prime numbers except 2+2.
The a(6) = 7 partitions with pairwise coprime parts: (111111), (21111), (3111), (321), (411), (51), (6). - _Gus Wiseman_, Apr 14 2018
Number of partitions of n into relatively prime parts =
A000837.
-
a051424 = length . filter f . partitions where
f [] = True
f (p:ps) = (all (== 1) $ map (gcd p) ps) && f ps
partitions n = ps 1 n where
ps x 0 = [[]]
ps x y = [t:ts | t <- [x..y], ts <- ps t (y - t)]
-- Reinhard Zumkeller, Dec 16 2013
-
with(numtheory):
b:= proc(n, i, s) option remember; local f;
if n=0 or i=1 then 1
elif i<2 then 0
else f:= factorset(i);
b(n, i-1, select(x->is(xis(x b(n, n, {}):
seq(a(n), n=0..80); # Alois P. Heinz, Mar 14 2012
-
b[n_, i_, s_] := b[n, i, s] = Module[{f}, If[n == 0 || i == 1, 1, If[i < 2, 0, f = FactorInteger[i][[All, 1]]; b[n, i-1, Select[s, # < i &]] + If[i <= n && f ~Intersection~ s == {}, b[n-i, i-1, Select[s ~Union~ f, # < i &]], 0]]]]; a[n_] := b[n, n, {}]; Table[a[n], {n, 0, 54}] (* Jean-François Alcover, Oct 03 2013, translated from Maple, after Alois P. Heinz *)
A302696
Numbers whose prime indices (with repetition) are pairwise coprime. Nonprime Heinz numbers of integer partitions with pairwise coprime parts.
Original entry on oeis.org
1, 2, 4, 6, 8, 10, 12, 14, 15, 16, 20, 22, 24, 26, 28, 30, 32, 33, 34, 35, 38, 40, 44, 46, 48, 51, 52, 55, 56, 58, 60, 62, 64, 66, 68, 69, 70, 74, 76, 77, 80, 82, 85, 86, 88, 92, 93, 94, 95, 96, 102, 104, 106, 110, 112, 116, 118, 119, 120, 122, 123, 124, 128, 132
Offset: 1
Sequence of integer partitions with pairwise coprime parts begins: (), (1), (11), (21), (111), (31), (211), (41), (32), (1111), (311), (51), (2111), (61), (411), (321).
Missing from this list are: (2), (3), (4), (22), (5), (6), (7), (221), (8), (42), (9), (33), (222).
Cf.
A000837,
A000961,
A001222,
A005117,
A007359,
A051424,
A275024,
A289508,
A289509,
A298748,
A302568,
A302569,
A302697,
A302698,
A327512,
A327513.
-
filter:= proc(n) local F;
F:= ifactors(n)[2];
if nops(F)=1 then if F[1][1] = 2 then return true else return false fi fi;
if ormap(t -> t[2]>1 and t[1] <> 2, F) then return false fi;
F:= map(t -> numtheory:-pi(t[1]), F);
ilcm(op(F))=convert(F,`*`)
end proc:
select(filter, [$1..200]); # Robert Israel, Sep 10 2020
-
primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Select[Range[200],Or[#===1,CoprimeQ@@primeMS[#]]&]
-
isA302696(n) = if(isprimepower(n),!(n%2), if(!issquarefree(n>>valuation(n,2)), 0, my(pis=apply(primepi,factor(n)[,1])); (lcm(pis)==factorback(pis)))); \\ Antti Karttunen, Dec 06 2021
Clarification (with repetition) added to the definition by
Antti Karttunen, Dec 06 2021
A078374
Number of partitions of n into distinct and relatively prime parts.
Original entry on oeis.org
1, 0, 1, 1, 2, 2, 4, 4, 6, 7, 11, 10, 17, 17, 23, 26, 37, 36, 53, 53, 70, 77, 103, 103, 139, 147, 184, 199, 255, 260, 339, 358, 435, 474, 578, 611, 759, 810, 963, 1045, 1259, 1331, 1609, 1726, 2015, 2200, 2589, 2762, 3259, 3509, 4058, 4416, 5119, 5488, 6364, 6882
Offset: 1
From _Gus Wiseman_, Oct 18 2020: (Start)
The a(1) = 1 through a(13) = 17 partitions (empty column indicated by dot, A = 10, B = 11, C = 12):
1 . 21 31 32 51 43 53 54 73 65 75 76
41 321 52 71 72 91 74 B1 85
61 431 81 532 83 543 94
421 521 432 541 92 651 A3
531 631 A1 732 B2
621 721 542 741 C1
4321 632 831 643
641 921 652
731 5421 742
821 6321 751
5321 832
841
931
A21
5431
6421
7321
(End)
A000837 is the not necessarily strict version.
A302796 gives the Heinz numbers of these partitions.
A305713 is the pairwise coprime instead of relatively prime version.
A000740 counts relatively prime compositions.
Cf.
A007359,
A101268,
A289508,
A289509,
A291166,
A298748,
A337451,
A337485,
A337451,
A337561,
A337563.
-
Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&GCD@@#==1&]],{n,15}] (* Gus Wiseman, Oct 18 2020 *)
A007359
Number of partitions of n into pairwise coprime parts that are >= 2.
Original entry on oeis.org
1, 0, 1, 1, 1, 2, 1, 3, 2, 3, 3, 5, 4, 6, 5, 5, 8, 9, 10, 11, 11, 10, 14, 18, 19, 18, 20, 20, 25, 30, 35, 34, 32, 32, 43, 43, 57, 56, 51, 55, 67, 78, 87, 87, 80, 82, 97, 125, 128, 127, 128, 127, 146, 182, 191, 185, 184, 193, 213, 263, 290, 279, 258, 271, 312, 354, 404, 402
Offset: 0
The a(17) = 9 strict partitions into pairwise coprime parts that are greater than 1 are (17), (15,2), (14,3), (13,4), (12,5), (11,6), (10,7), (9,8), (7,5,3,2). - _Gus Wiseman_, Apr 14 2018
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Cf.
A000837,
A007359,
A007360,
A051424,
A101268,
A123131,
A184956,
A187718,
A289508,
A289509,
A298748,
A302569,
A302696,
A302698,
A302797.
-
with(numtheory):
b:= proc(n, i, s) option remember; local f;
if n=0 then 1
elif i<2 then 0
else f:= factorset(i);
b(n, i-1, select(x-> is(x is(x b(n, n, {}):
seq(a(n), n=0..80); # Alois P. Heinz, Mar 14 2012
-
b[n_, i_, s_] := b[n, i, s] = Module[{f}, If[n == 0 || i == 1, 1, If[i<2, 0, f = FactorInteger[i][[All, 1]]; b[n, i-1, Select[s, #Jean-François Alcover, Feb 17 2014, after Alois P. Heinz *)
Table[Length[Select[IntegerPartitions[n],FreeQ[#,1]&&(Length[#]===1||CoprimeQ@@#)&]],{n,20}] (* Gus Wiseman, Apr 14 2018 *)
More terms from Pab Ter (pabrlos2(AT)yahoo.com), Nov 13 2005
A304711
Heinz numbers of integer partitions whose distinct parts are pairwise coprime.
Original entry on oeis.org
2, 4, 6, 8, 10, 12, 14, 15, 16, 18, 20, 22, 24, 26, 28, 30, 32, 33, 34, 35, 36, 38, 40, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 58, 60, 62, 64, 66, 68, 69, 70, 72, 74, 75, 76, 77, 80, 82, 85, 86, 88, 90, 92, 93, 94, 95, 96, 98, 99, 100, 102, 104, 106, 108, 110
Offset: 1
Sequence of all partitions whose distinct parts are pairwise coprime begins (1), (11), (21), (111), (31), (211), (41), (32), (1111), (221), (311), (51), (2111), (61), (411), (321), (11111), (52), (71), (43), (2211), (81), (3111).
Cf.
A000837,
A007359,
A018783,
A051424,
A056239,
A078374,
A101268,
A289508,
A289509,
A298748,
A300486,
A302569,
A302696,
A302698,
A302796,
A302797,
A304709.
A318978
Heinz numbers of integer partitions with a common divisor > 1.
Original entry on oeis.org
3, 5, 7, 9, 11, 13, 17, 19, 21, 23, 25, 27, 29, 31, 37, 39, 41, 43, 47, 49, 53, 57, 59, 61, 63, 65, 67, 71, 73, 79, 81, 83, 87, 89, 91, 97, 101, 103, 107, 109, 111, 113, 115, 117, 121, 125, 127, 129, 131, 133, 137, 139, 147, 149, 151, 157, 159, 163, 167, 169
Offset: 1
The sequence of all integer partitions with a common divisor begins: (2), (3), (4), (2,2), (5), (6), (7), (8), (4,2), (9), (3,3), (2,2,2), (10), (11), (12), (6,2), (13), (14), (15), (4,4), (16), (8,2), (17), (18), (4,2,2), (6,3), (19), (20), (21), (22), (2,2,2,2), (23), (10,2), (24), (6,4), (25).
-
Select[Range[100],GCD@@PrimePi/@If[#==1,{},FactorInteger[#]][[All,1]]>1&]
A302697
Odd numbers whose prime indices are relatively prime. Heinz numbers of integer partitions with no 1's and with relatively prime parts.
Original entry on oeis.org
15, 33, 35, 45, 51, 55, 69, 75, 77, 85, 93, 95, 99, 105, 119, 123, 135, 141, 143, 145, 153, 155, 161, 165, 175, 177, 187, 195, 201, 205, 207, 209, 215, 217, 219, 221, 225, 231, 245, 249, 253, 255, 265, 275, 279, 285, 287, 291, 295, 297, 309, 315, 323, 327, 329
Offset: 1
Sequence of integer partitions with no 1's and with relatively prime parts begins:
015: (3,2)
033: (5,2)
035: (4,3)
045: (3,2,2)
051: (7,2)
055: (5,3)
069: (9,2)
075: (3,3,2)
077: (5,4)
085: (7,3)
093: (11,2)
095: (8,3)
099: (5,2,2)
105: (4,3,2)
119: (7,4)
123: (13,2)
135: (3,2,2,2)
Cf.
A000837,
A000961,
A001222,
A005117,
A007359,
A051424,
A076078,
A101268,
A275024,
A285572,
A289509,
A298748,
A302568,
A302569,
A302696,
A302698.
-
primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Select[Range[1,200,2],GCD@@primeMS[#]===1&]
A303140
Number of strict integer partitions of n with at least two but not all parts having a common divisor greater than 1.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 1, 0, 2, 2, 4, 2, 8, 7, 14, 14, 21, 18, 33, 32, 50, 54, 72, 67, 103, 110, 145, 155, 201, 196, 271, 293, 372, 400, 493, 512, 647, 704, 858, 924, 1115, 1167, 1436, 1560, 1854, 2022, 2368, 2510, 3005, 3255, 3804, 4144, 4792, 5116, 5989, 6514, 7486
Offset: 1
The a(14) = 7 partitions are (932), (8321), (7421), (653), (6521), (6431), (5432).
Cf.
A000837,
A018783,
A051424,
A078374,
A168532,
A289508,
A289509,
A298748,
A300486,
A302569,
A302696,
A302796,
A303138,
A303139.
A303282
Numbers whose prime indices have no common divisor other than 1 but are not pairwise coprime.
Original entry on oeis.org
18, 36, 42, 45, 50, 54, 72, 75, 78, 84, 90, 98, 99, 100, 105, 108, 114, 126, 130, 135, 144, 150, 153, 156, 162, 168, 174, 175, 180, 182, 195, 196, 198, 200, 207, 210, 216, 222, 225, 228, 230, 231, 234, 242, 245, 250, 252, 258, 260, 266, 270, 275, 279, 285, 288
Offset: 1
The sequence of integer partitions whose Heinz numbers belong to this sequence begins (221), (2211), (421), (322), (331), (2221), (22111), (332), (621), (4211), (3221), (441), (522), (3311), (432), (22211).
Cf.
A000837,
A001222,
A018783,
A051424,
A056239,
A078374,
A168532,
A289508,
A289509,
A296150,
A298748,
A300486,
A302569,
A302696,
A302796,
A303138,
A303139,
A303140,
A303283.
-
primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Select[Range[400],!CoprimeQ@@primeMS[#]&&GCD@@primeMS[#]===1&]
A304712
Number of integer partitions of n whose parts are all equal or whose distinct parts are pairwise coprime.
Original entry on oeis.org
1, 1, 2, 3, 5, 7, 10, 14, 19, 25, 32, 43, 54, 70, 86, 105, 130, 162, 196, 240, 286, 339, 405, 485, 573, 674, 790, 922, 1072, 1252, 1456, 1685, 1939, 2226, 2557, 2923, 3349, 3822, 4347, 4931, 5593, 6335, 7170, 8092, 9105, 10233, 11495, 12903, 14458, 16169, 18063
Offset: 0
The a(6) = 10 partitions whose parts are all equal or whose distinct parts are pairwise coprime are (6), (51), (411), (33), (321), (3111), (222), (2211), (21111), (111111).
Cf.
A000837,
A007359,
A018783,
A051424,
A056239,
A078374,
A101268,
A289508,
A289509,
A298748,
A300486,
A302569,
A302696,
A302698,
A302796,
A302797,
A304709,
A304711.
-
g:= proc(n, i, s) `if`(n=0, 1, `if`(i<1, 0,
b(n, i, select(x-> x<=i, s))))
end:
b:= proc(n, i, s) option remember; g(n, i-1, s)+(f->
`if`(f intersect s={}, add(g(n-i*j, i-1, s union f)
, j=1..n/i), 0))(numtheory[factorset](i))
end:
a:= n-> g(n$2, {}):
seq(a(n), n=0..60); # Alois P. Heinz, May 17 2018
-
Table[Select[IntegerPartitions[n],Or[SameQ@@#,CoprimeQ@@Union[#]]&]//Length,{n,20}]
(* Second program: *)
g[n_, i_, s_] := If[n == 0, 1, If[i < 1, 0, b[n, i, Select[s, # <= i &]]]];
b[n_, i_, s_] := b[n, i, s] = g[n, i - 1, s] + Function[f,
If[f ~Intersection~ s == {}, Sum[g[n - i*j, i - 1, s ~Union~ f],
{j, 1, n/i}], 0]][FactorInteger[i][[All, 1]]];
a[n_] := g[n, n, {}];
a /@ Range[0, 60] (* Jean-François Alcover, May 10 2021, after Alois P. Heinz *)
Showing 1-10 of 25 results.
Comments