A289509
Numbers k such that the gcd of the indices j for which the j-th prime prime(j) divides k is 1.
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, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 58, 60, 62, 64, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 85, 86, 88, 90, 92, 93, 94, 95, 96, 98, 99, 100, 102, 104
Offset: 1
6 is a term because 6 = p_1*p_2 and gcd(1,2) = 1.
From _Gus Wiseman_, Apr 13 2018: (Start)
Sequence of integer partitions with relatively prime parts begins:
02 : (1)
04 : (11)
06 : (21)
08 : (111)
10 : (31)
12 : (211)
14 : (41)
15 : (32)
16 : (1111)
18 : (221)
20 : (311)
22 : (51)
24 : (2111)
26 : (61)
28 : (411)
30 : (321)
32 : (11111)
33 : (52)
34 : (71)
35 : (43)
36 : (2211)
38 : (81)
40 : (3111)
(End)
Cf.
A001222,
A007359,
A051424,
A056239,
A289506,
A289507,
A289508,
A296150,
A302696,
A302697,
A302698,
A302796.
-
p:=1:for ind to 10000 do p:=nextprime(p);primeindex[p]:=ind;od:
out:=[]:for n from 2 to 100 do m:=[];f:=ifactors(n)[2];g:=0;
for k to nops(f) do mk:=primeindex[f[k][1]];m:=[op(m),mk];
g:=gcd(g,mk);od; if g=1 then out:=[op(out),n];fi;od:out;
-
Select[Range[200],GCD@@PrimePi/@FactorInteger[#][[All,1]]===1&] (* Gus Wiseman, Apr 13 2018 *)
-
isok(n) = my(f=factor(n)); gcd(apply(x->primepi(x), f[,1])) == 1; \\ Michel Marcus, Jul 19 2017
-
from sympy import gcd, primepi, primefactors
def ok(n): return gcd([primepi(p) for p in primefactors(n)]) == 1
print([n for n in range(1, 151) if ok(n)]) # Indranil Ghosh, Aug 06 2017
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
A302698
Number of integer partitions of n into relatively prime parts that are all greater than 1.
Original entry on oeis.org
0, 0, 0, 0, 1, 0, 3, 2, 5, 4, 13, 7, 23, 18, 32, 33, 65, 50, 104, 92, 148, 153, 252, 226, 376, 376, 544, 570, 846, 821, 1237, 1276, 1736, 1869, 2552, 2643, 3659, 3887, 5067, 5509, 7244, 7672, 10086, 10909, 13756, 15168, 19195, 20735, 26237, 28708, 35418, 39207
Offset: 1
The a(5) = 1 through a(12) = 7 partitions (empty column indicated by dot):
(32) . (43) (53) (54) (73) (65) (75)
(52) (332) (72) (433) (74) (543)
(322) (432) (532) (83) (552)
(522) (3322) (92) (732)
(3222) (443) (4332)
(533) (5322)
(542) (33222)
(632)
(722)
(3332)
(4322)
(5222)
(32222)
A000837 is the version allowing 1's.
A002865 does not require relative primality.
A302697 gives the Heinz numbers of these partitions.
A337451 is the ordered strict version.
A337485 is the pairwise coprime instead of relatively prime version.
A000740 counts relatively prime compositions.
A078374 counts relatively prime strict partitions.
A212804 counts compositions with no 1's.
A291166 appears to rank relatively prime compositions.
A332004 counts strict relatively prime compositions.
A337561 counts pairwise coprime strict compositions.
-
b:= proc(n, i, g) option remember; `if`(n=0, `if`(g=1, 1, 0),
`if`(i<2, 0, b(n, i-1, g)+b(n-i, min(n-i, i), igcd(g, i))))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=1..60); # Alois P. Heinz, Apr 12 2018
-
Table[Length[Select[IntegerPartitions[n],FreeQ[#,1]&&GCD@@#===1&]],{n,30}]
(* Second program: *)
b[n_, i_, g_] := b[n, i, g] = If[n == 0, If[g == 1, 1, 0], If[i < 2, 0, b[n, i - 1, g] + b[n - i, Min[n - i, i], GCD[g, i]]]];
a[n_] := b[n, n, 0];
Array[a, 60] (* Jean-François Alcover, May 10 2021, after Alois P. Heinz *)
A302796
Squarefree numbers whose prime indices are relatively prime. Nonprime Heinz numbers of strict integer partitions with relatively prime parts.
Original entry on oeis.org
1, 2, 6, 10, 14, 15, 22, 26, 30, 33, 34, 35, 38, 42, 46, 51, 55, 58, 62, 66, 69, 70, 74, 77, 78, 82, 85, 86, 93, 94, 95, 102, 105, 106, 110, 114, 118, 119, 122, 123, 130, 134, 138, 141, 142, 143, 145, 146, 154, 155, 158, 161, 165, 166, 170, 174, 177, 178, 182
Offset: 1
Sequence of terms together with their sets of prime indices begins:
01 : {}
02 : {1}
06 : {1,2}
10 : {1,3}
14 : {1,4}
15 : {2,3}
22 : {1,5}
26 : {1,6}
30 : {1,2,3}
33 : {2,5}
34 : {1,7}
35 : {3,4}
38 : {1,8}
42 : {1,2,4}
46 : {1,9}
51 : {2,7}
55 : {3,5}
58 : {1,10}
62 : {1,11}
66 : {1,2,5}
Cf.
A001222,
A003963,
A005117,
A007359,
A051424,
A056239,
A275024,
A289509,
A302242,
A302505,
A302696,
A302697,
A302698,
A302797,
A302798.
-
Select[Range[100],Or[#===1,SquareFreeQ[#]&&GCD@@PrimePi/@FactorInteger[#][[All,1]]===1]&]
-
isok(n) = {if (n == 1, return (1)); if (issquarefree(n), my(f = factor(n)); return (gcd(vector(#f~, k, primepi(f[k,1]))) == 1););} \\ Michel Marcus, Apr 13 2018
A355737
Number of ways to choose a sequence of divisors, one of each prime index of n (with multiplicity), such that the result has no common divisor > 1.
Original entry on oeis.org
0, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 2, 1, 3, 4, 1, 1, 4, 1, 2, 4, 2, 1, 2, 3, 4, 7, 3, 1, 4, 1, 1, 4, 2, 6, 4, 1, 4, 6, 2, 1, 6, 1, 2, 8, 3, 1, 2, 5, 4, 4, 4, 1, 8, 4, 3, 5, 4, 1, 4, 1, 2, 10, 1, 6, 4, 1, 2, 6, 6, 1, 4, 1, 6, 8, 4, 6, 8, 1, 2, 15, 2, 1, 6, 4, 4
Offset: 1
The a(2) = 1 through a(18) = 4 choices:
1 1 11 1 11 1 111 11 11 1 111 1 11 11 1111 1 111
12 12 13 112 12 13 112
21 14 21 121
23 122
For weakly increasing instead of coprime we have
A355735, primes
A355745.
Positions of first appearances are
A355738.
A001222 counts prime factors with multiplicity.
A003963 multiplies together the prime indices of n.
A120383 lists numbers divisible by all of their prime indices.
A289508 gives GCD of prime indices.
A324850 lists numbers divisible by the product of their prime indices.
Cf.
A000720,
A007359,
A051424,
A076610,
A289507,
A296150,
A302696,
A302698,
A355733,
A355744,
A355748.
-
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Table[Length[Select[Tuples[Divisors/@primeMS[n]],GCD@@#==1&]],{n,100}]
A302797
Squarefree numbers whose prime indices are pairwise coprime. Heinz numbers of strict integer partitions with pairwise coprime parts.
Original entry on oeis.org
1, 2, 6, 10, 14, 15, 22, 26, 30, 33, 34, 35, 38, 46, 51, 55, 58, 62, 66, 69, 70, 74, 77, 82, 85, 86, 93, 94, 95, 102, 106, 110, 118, 119, 122, 123, 134, 138, 141, 142, 143, 145, 146, 154, 155, 158, 161, 165, 166, 170, 177, 178, 186, 187, 190, 194, 201, 202
Offset: 1
Sequence of terms together with their sets of prime indices begins:
01 : {}
02 : {1}
06 : {1,2}
10 : {1,3}
14 : {1,4}
15 : {2,3}
22 : {1,5}
26 : {1,6}
30 : {1,2,3}
33 : {2,5}
34 : {1,7}
35 : {3,4}
38 : {1,8}
46 : {1,9}
51 : {2,7}
55 : {3,5}
58 : {1,10}
62 : {1,11}
66 : {1,2,5}
69 : {2,9}
70 : {1,3,4}
Cf.
A001222,
A003963,
A005117,
A007359,
A051424,
A056239,
A275024,
A289509,
A302242,
A302505,
A302696,
A302697,
A302698,
A302796,
A302798.
A366843
Number of integer partitions of n into odd, relatively prime parts.
Original entry on oeis.org
1, 1, 1, 1, 2, 2, 3, 4, 6, 6, 9, 11, 13, 17, 21, 23, 32, 37, 42, 53, 62, 70, 88, 103, 116, 139, 164, 184, 220, 255, 283, 339, 390, 435, 511, 578, 653, 759, 863, 963, 1107, 1259, 1401, 1609, 1814, 2015, 2303, 2589, 2878, 3259, 3648, 4058, 4580, 5119, 5672, 6364
Offset: 0
The a(1) = 1 through a(8) = 6 partitions:
(1) (11) (111) (31) (311) (51) (331) (53)
(1111) (11111) (3111) (511) (71)
(111111) (31111) (3311)
(1111111) (5111)
(311111)
(11111111)
A000740 counts relatively prime compositions.
A366842 counts partitions whose odd parts have a common divisor > 1.
Cf.
A007359,
A047967,
A055922,
A066208,
A113685,
A116598,
A289509,
A289508,
A302697,
A337485,
A366845,
A366848,
A366849.
-
Table[Length[Select[IntegerPartitions[n],#=={}||And@@OddQ/@#&&GCD@@#==1&]],{n,0,30}]
-
from math import gcd
from sympy.utilities.iterables import partitions
def A366843(n): return sum(1 for p in partitions(n) if all(d&1 for d in p) and gcd(*p)==1) # Chai Wah Wu, Oct 30 2023
A337450
Number of relatively prime compositions of n with no 1's.
Original entry on oeis.org
0, 0, 0, 0, 0, 2, 0, 7, 5, 17, 17, 54, 51, 143, 168, 358, 482, 986, 1313, 2583, 3663, 6698, 9921, 17710, 26489, 46352, 70928, 121137, 188220, 317810, 497322, 832039, 1313501, 2177282, 3459041, 5702808, 9094377, 14930351, 23895672, 39084070, 62721578
Offset: 0
The a(5) = 2 through a(10) = 17 compositions (empty column indicated by dot):
(2,3) . (2,5) (3,5) (2,7) (3,7)
(3,2) (3,4) (5,3) (4,5) (7,3)
(4,3) (2,3,3) (5,4) (2,3,5)
(5,2) (3,2,3) (7,2) (2,5,3)
(2,2,3) (3,3,2) (2,2,5) (3,2,5)
(2,3,2) (2,3,4) (3,3,4)
(3,2,2) (2,4,3) (3,4,3)
(2,5,2) (3,5,2)
(3,2,4) (4,3,3)
(3,4,2) (5,2,3)
(4,2,3) (5,3,2)
(4,3,2) (2,2,3,3)
(5,2,2) (2,3,2,3)
(2,2,2,3) (2,3,3,2)
(2,2,3,2) (3,2,2,3)
(2,3,2,2) (3,2,3,2)
(3,2,2,2) (3,3,2,2)
A000740 is the version allowing 1's.
2*
A055684(n) is the case of length 2.
A337452 is the unordered strict version.
A000837 counts relatively prime partitions.
A002865 counts partitions with no 1's.
A101268 counts singleton or pairwise coprime compositions.
A212804 counts compositions with no 1's.
A291166 appears to rank relatively prime compositions.
A337462 counts pairwise coprime compositions.
-
b:= proc(n, g) option remember; `if`(n=0,
`if`(g=1, 1, 0), add(b(n-j, igcd(g, j)), j=2..n))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..42);
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MemberQ[#,1]&&GCD@@#==1&]],{n,0,15}]
A343338
Numbers with no prime index dividing or divisible by all the other prime indices.
Original entry on oeis.org
1, 15, 33, 35, 45, 51, 55, 69, 75, 77, 85, 91, 93, 95, 99, 105, 119, 123, 135, 141, 143, 145, 153, 155, 161, 165, 175, 177, 187, 201, 203, 205, 207, 209, 215, 217, 219, 221, 225, 231, 245, 247, 249, 253, 255, 265, 275, 279, 285, 287, 291, 295, 297, 299, 301
Offset: 1
The sequence of terms together with their prime indices begins:
1: {} 105: {2,3,4} 203: {4,10}
15: {2,3} 119: {4,7} 205: {3,13}
33: {2,5} 123: {2,13} 207: {2,2,9}
35: {3,4} 135: {2,2,2,3} 209: {5,8}
45: {2,2,3} 141: {2,15} 215: {3,14}
51: {2,7} 143: {5,6} 217: {4,11}
55: {3,5} 145: {3,10} 219: {2,21}
69: {2,9} 153: {2,2,7} 221: {6,7}
75: {2,3,3} 155: {3,11} 225: {2,2,3,3}
77: {4,5} 161: {4,9} 231: {2,4,5}
85: {3,7} 165: {2,3,5} 245: {3,4,4}
91: {4,6} 175: {3,3,4} 247: {6,8}
93: {2,11} 177: {2,17} 249: {2,23}
95: {3,8} 187: {5,7} 253: {5,9}
99: {2,2,5} 201: {2,19} 255: {2,3,7}
For example, the prime indices of 975 are {2,3,3,6}, all of which divide 6, but not all of which are multiples of 2, so 975 is not in the sequence.
The first condition alone gives
A342193.
The second condition alone gives
A343337.
The partitions with these Heinz numbers are counted by
A343342.
The opposite version is the complement of
A343343.
A000070 counts partitions with a selected part.
A067824 counts strict chains of divisors starting with n.
A253249 counts strict chains of divisors.
A339564 counts factorizations with a selected factor.
Cf.
A083710,
A130689,
A338470,
A339562,
A341450,
A343341,
A343346,
A343347,
A343348,
A343377,
A343379,
A343382.
A101391
Triangle read by rows: T(n,k) is the number of compositions of n into k parts x_1, x_2, ..., x_k such that gcd(x_1,x_2,...,x_k) = 1 (1<=k<=n).
Original entry on oeis.org
1, 0, 1, 0, 2, 1, 0, 2, 3, 1, 0, 4, 6, 4, 1, 0, 2, 9, 10, 5, 1, 0, 6, 15, 20, 15, 6, 1, 0, 4, 18, 34, 35, 21, 7, 1, 0, 6, 27, 56, 70, 56, 28, 8, 1, 0, 4, 30, 80, 125, 126, 84, 36, 9, 1, 0, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1, 0, 4, 42, 154, 325, 461, 462, 330, 165, 55, 11, 1, 0, 12, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1
Offset: 1
T(6,3)=9 because we have 411,141,114 and the six permutations of 123 (222 does not qualify).
T(8,3)=18 because binomial(0,2)*mobius(8/1)+binomial(1,2)*mobius(8/2)+binomial(3,2)*mobius(8/4)+binomial(7,2)*mobius(8/8)=0+0+(-3)+21=18.
Triangle begins:
1;
0, 1;
0, 2, 1;
0, 2, 3, 1;
0, 4, 6, 4, 1;
0, 2, 9, 10, 5, 1;
0, 6, 15, 20, 15, 6, 1;
0, 4, 18, 34, 35, 21, 7, 1;
0, 6, 27, 56, 70, 56, 28, 8, 1;
0, 4, 30, 80, 125, 126, 84, 36, 9, 1;
0, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1;
0, 4, 42, 154, 325, 461, 462, 330, 165, 55, 11, 1;
0, 12, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1;
...
From _Gus Wiseman_, Oct 19 2020: (Start)
Row n = 6 counts the following compositions:
(15) (114) (1113) (11112) (111111)
(51) (123) (1122) (11121)
(132) (1131) (11211)
(141) (1212) (12111)
(213) (1221) (21111)
(231) (1311)
(312) (2112)
(321) (2121)
(411) (2211)
(3111)
Missing are: (42), (24), (33), (222).
(End)
- Alois P. Heinz, Rows n = 1..200, flattened
- H. W. Gould, Binomial coefficients, the bracket function and compositions with relatively prime summands, Fib. Quart. 2(4) (1964), 241-260.
- Temba Shonhiwa, Compositions with pairwise relatively prime summands within a restricted setting, Fibonacci Quart. 44 (2006), no. 4, 316-323.
A000837 counts relatively prime partitions.
A135278 counts compositions by length.
A282748 is the pairwise coprime instead of relatively prime version.
A291166 ranks these compositions (evidently).
-
with(numtheory): T:=proc(n,k) local d, j, b: d:=divisors(n): for j from 1 to tau(n) do b[j]:=binomial(d[j]-1,k-1)*mobius(n/d[j]) od: sum(b[i],i=1..tau(n)) end: for n from 1 to 14 do seq(T(n,k),k=1..n) od; # yields the sequence in triangular form
# second Maple program:
b:= proc(n, g) option remember; `if`(n=0, `if`(g=1, 1, 0),
expand(add(b(n-j, igcd(g, j))*x, j=1..n)))
end:
T:= (n, k)-> coeff(b(n,0),x,k):
seq(seq(T(n,k), k=1..n), n=1..14); # Alois P. Heinz, May 05 2025
-
t[n_, k_] := Sum[Binomial[d-1, k-1]*MoebiusMu[n/d], {d, Divisors[n]}]; Table[t[n, k], {n, 2, 14}, {k, 2, n}] // Flatten (* Jean-François Alcover, Jan 20 2014 *)
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{k}],GCD@@#==1&]],{n,10},{k,2,n}] (* change {k,2,n} to {k,1,n} for the version with zeros. - Gus Wiseman, Oct 19 2020 *)
-
T(n, k) = sumdiv(n, d, binomial(d-1, k-1)*moebius(n/d)); \\ Michel Marcus, Mar 09 2016
Showing 1-10 of 20 results.
Comments