A328336
Numbers with no consecutive prime indices relatively prime.
Original entry on oeis.org
1, 2, 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
Offset: 1
The sequence of terms together with their prime indices begins:
1: {}
2: {1}
3: {2}
5: {3}
7: {4}
9: {2,2}
11: {5}
13: {6}
17: {7}
19: {8}
21: {2,4}
23: {9}
25: {3,3}
27: {2,2,2}
29: {10}
31: {11}
37: {12}
39: {2,6}
41: {13}
43: {14}
Numbers with consecutive prime indices relatively prime are
A328335.
Strict partitions with no consecutive parts relatively prime are
A328220.
Numbers with relatively prime prime indices are
A289509.
Cf.
A000837,
A056239,
A078374,
A112798,
A281116,
A289508,
A318981,
A328168,
A328169,
A328172,
A328187,
A328188.
-
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Select[Range[100],!MatchQ[primeMS[#],{_,x_,y_,_}/;GCD[x,y]==1]&]
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}]
A337451
Number of relatively prime strict compositions of n with no 1's.
Original entry on oeis.org
0, 0, 0, 0, 0, 2, 0, 4, 2, 10, 8, 20, 14, 34, 52, 72, 90, 146, 172, 244, 390, 502, 680, 956, 1218, 1686, 2104, 3436, 4078, 5786, 7200, 10108, 12626, 17346, 20876, 32836, 38686, 53674, 67144, 91528, 113426, 152810, 189124, 245884, 343350, 428494, 552548, 719156
Offset: 0
The a(5) = 2 through a(10) = 8 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) (5,4) (2,3,5)
(5,2) (7,2) (2,5,3)
(2,3,4) (3,2,5)
(2,4,3) (3,5,2)
(3,2,4) (5,2,3)
(3,4,2) (5,3,2)
(4,2,3)
(4,3,2)
A032022 does not require relative primality.
A302698 is the unordered non-strict version.
A332004 is the version allowing 1's.
A000837 counts relatively prime partitions.
A032020 counts strict compositions.
A078374 counts strict relatively prime partitions.
A002865 counts partitions with no 1's.
A212804 counts compositions with no 1's.
A291166 appears to rank relatively prime compositions.
A337462 counts pairwise coprime compositions.
A337561 counts strict pairwise coprime compositions.
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@#&&!MemberQ[#,1]&&GCD@@#==1&]],{n,0,15}]
A367582
Triangle read by rows where T(n,k) is the number of integer partitions of n whose multiset multiplicity kernel (in which each multiplicity becomes the least element of that multiplicity), sums to k.
Original entry on oeis.org
1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 1, 2, 2, 1, 0, 1, 3, 3, 2, 1, 1, 0, 1, 1, 4, 3, 3, 2, 1, 0, 1, 3, 5, 4, 4, 3, 1, 1, 0, 1, 2, 6, 4, 8, 3, 3, 2, 1, 0, 1, 3, 7, 9, 6, 7, 4, 3, 1, 1, 0, 1, 1, 8, 7, 11, 9, 9, 4, 3, 2, 1
Offset: 0
Triangle begins:
1
0 1
0 1 1
0 1 1 1
0 1 2 1 1
0 1 1 2 2 1
0 1 3 3 2 1 1
0 1 1 4 3 3 2 1
0 1 3 5 4 4 3 1 1
0 1 2 6 4 8 3 3 2 1
0 1 3 7 9 6 7 4 3 1 1
0 1 1 8 7 11 9 9 4 3 2 1
0 1 5 10 11 13 10 11 6 5 3 1 1
0 1 1 10 11 17 14 18 10 9 4 3 2 1
0 1 3 12 17 19 18 22 14 12 8 4 3 1 1
0 1 3 12 15 27 19 31 19 19 10 9 5 3 2 1
0 1 4 15 23 27 31 33 24 26 18 12 8 4 3 1 1
0 1 1 14 20 35 33 48 32 37 25 20 11 10 4 3 2 1
Row n = 7 counts the following partitions:
(1111111) (61) (421) (52) (4111) (511) (7)
(2221) (331) (322) (43)
(22111) (31111) (3211)
(211111)
A072233 counts partitions by number of parts.
A116608 counts partitions by number of distinct parts.
A116861 counts partitions by sum of distinct parts.
-
mmk[q_]:=With[{mts=Length/@Split[q]}, Sort[Table[Min@@Select[q, Count[q,#]==i&], {i,mts}]]];
Table[Length[Select[IntegerPartitions[n], Total[mmk[#]]==k&]], {n,0,10}, {k,0,n}]
A371178
Number of integer partitions of n containing all divisors of all parts.
Original entry on oeis.org
1, 1, 1, 2, 3, 4, 6, 9, 12, 16, 21, 28, 37, 48, 62, 80, 101, 127, 162, 202, 252, 312, 386, 475, 585, 713, 869, 1056, 1278, 1541, 1859, 2232, 2675, 3196, 3811, 4534, 5386, 6379, 7547, 8908, 10497, 12345, 14501, 16999, 19897, 23253, 27135, 31618, 36796, 42756
Offset: 0
The partition (4,2,1,1) contains all distinct divisors {1,2,4}, so is counted under a(8).
The partition (4,4,3,2,2,2,1) contains all distinct divisors {1,2,3,4} so is counted under 4 + 4 + 3 + 2 + 2 + 2 + 1 = 18. - _David A. Corneth_, Mar 18 2024
The a(0) = 1 through a(8) = 12 partitions:
() (1) (11) (21) (31) (221) (51) (331) (71)
(111) (211) (311) (321) (421) (521)
(1111) (2111) (2211) (511) (3221)
(11111) (3111) (2221) (3311)
(21111) (3211) (4211)
(111111) (22111) (5111)
(31111) (22211)
(211111) (32111)
(1111111) (221111)
(311111)
(2111111)
(11111111)
For partitions with no divisors of parts we have
A305148, ranks
A316476.
The complement is counted by
A371132.
For submultisets instead of distinct parts we have
A371172, ranks
A371165.
These partitions have ranks
A371177.
A008284 counts partitions by length.
Cf.
A000837,
A003963,
A239312,
A285573,
A305148,
A319055,
A355529,
A370803,
A370808,
A370813,
A371168,
A371171,
A371173.
-
Table[Length[Select[IntegerPartitions[n],SubsetQ[#,Union@@Divisors/@#]&]],{n,0,30}]
A056503
Number of periodic palindromic structures of length n using a maximum of two different symbols.
Original entry on oeis.org
1, 2, 2, 4, 4, 7, 8, 14, 16, 26, 32, 51, 64, 100, 128, 198, 256, 392, 512, 778, 1024, 1552, 2048, 3091, 4096, 6176, 8192, 12324, 16384, 24640, 32768, 49222, 65536, 98432, 131072, 196744, 262144, 393472, 524288, 786698, 1048576, 1573376, 2097152, 3146256, 4194304
Offset: 1
From _Gus Wiseman_, Sep 16 2018: (Start)
The sequence of palindromic cyclic compositions begins:
(1) (2) (3) (4) (5) (6) (7)
(11) (111) (22) (113) (33) (115)
(112) (122) (114) (133)
(1111) (11111) (222) (223)
(1122) (11113)
(11112) (11212)
(111111) (11122)
(1111111)
(End)
- M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]
Cf.
A000740,
A000837,
A008965,
A025065,
A059966,
A242414,
A296302,
A317085,
A317086,
A317087,
A318731.
-
(* b = A164090, c = A045674 *)
b[n_] := (1/4)*(7 - (-1)^n)*2^((1/4)*(2*n + (-1)^n - 1));
c[0] = 1; c[n_] := c[n] = If[EvenQ[n], 2^(n/2-1) + c[n/2], 2^((n-1)/2)];
a[n_?OddQ] := b[n]/2; a[n_?EvenQ] := (1/2)*(b[n] + c[n/2]);
Array[a, 45] (* Jean-François Alcover, Oct 08 2017, after Andrew Howroyd *)
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Function[q,And[Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And],Array[SameQ[RotateRight[q,#],Reverse[RotateRight[q,#]]]&,Length[q],1,Or]]]]],{n,15}] (* Gus Wiseman, Sep 16 2018 *)
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
A303139
Number of 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, 1, 1, 5, 6, 13, 17, 33, 37, 68, 82, 125, 159, 237, 278, 409, 491, 674, 830, 1121, 1329, 1781, 2144, 2770, 3345, 4299, 5086, 6507, 7752, 9687, 11571, 14378, 16985, 21039, 24876, 30379, 35924, 43734, 51320, 62238, 73068, 87747, 103021, 123347, 143955
Offset: 1
The a(7) = 5 partitions are (421), (331), (322), (2221), (22111).
Cf.
A000837,
A018783,
A051424,
A078374,
A168532,
A289508,
A289509,
A298748,
A300486,
A302569,
A302696,
A302796,
A303138,
A303140.
A303280
Number of strict integer partitions of n whose parts have a common divisor other than 1.
Original entry on oeis.org
0, 1, 1, 1, 1, 2, 1, 2, 2, 3, 1, 5, 1, 5, 4, 6, 1, 10, 1, 11, 6, 12, 1, 19, 3, 18, 8, 23, 1, 36, 1, 32, 13, 38, 7, 57, 1, 54, 19, 68, 1, 95, 1, 90, 33, 104, 1, 148, 5, 149, 39, 166, 1, 230, 14, 226, 55, 256, 1, 360, 1, 340, 82, 390, 20, 527, 1, 513, 105, 609, 1
Offset: 1
The a(18) = 10 strict partitions are (18), (10,8), (12,6), (14,4), (15,3), (16,2), (8,6,4), (9,6,3), (10,6,2), (12,4,2).
Cf.
A000009,
A000837,
A018783,
A051424,
A078374,
A168532,
A289508,
A289509,
A298748,
A300486,
A302698,
A302796,
A303138.
-
with(numtheory):
b:= proc(n) option remember; `if`(n=0, 1, add(add(
`if`(d::odd, d, 0), d=divisors(j))*b(n-j), j=1..n)/n)
end:
a:= n-> -add(mobius(d)*b(n/d), d=divisors(n) minus {1}):
seq(a(n), n=1..100); # Alois P. Heinz, Apr 23 2018
-
Table[-Sum[MoebiusMu[d]*PartitionsQ[n/d],{d,Rest[Divisors[n]]}],{n,100}]
A316432
Number of integer partitions of n whose length is equal to the GCD of all parts.
Original entry on oeis.org
1, 0, 0, 1, 0, 1, 0, 1, 1, 2, 0, 2, 0, 3, 2, 3, 0, 5, 0, 3, 4, 5, 0, 8, 1, 6, 6, 6, 0, 11, 0, 8, 10, 8, 2, 18, 0, 9, 14, 15, 0, 19, 0, 16, 21, 11, 0, 34, 1, 16, 24, 24, 0, 30, 10, 27, 30, 14, 0, 71, 0, 15, 34, 38, 18, 47, 0, 47, 44, 36, 0, 88, 0, 18, 79, 63, 5
Offset: 1
The a(24) = 8 partitions:
(14,10), (22,2),
(9,9,6), (12,9,3), (15,6,3), (18,3,3),
(8,8,4,4), (12,4,4,4).
-
Table[Length[Select[IntegerPartitions[n],GCD@@#==Length[#]&]],{n,30}]
-
a(n) = {my(nb = 0); forpart(p=n, if (gcd(p)==#p, nb++);); nb;} \\ Michel Marcus, Jul 03 2018
Comments