A187262
Irregular triangle T(n,k), n>=1, 1<=k<=A036234(n), read by rows: T(n,k) is the number of nonempty subsets of {1, 2, ..., n} having <=k pairwise coprime elements.
Original entry on oeis.org
1, 2, 3, 3, 6, 7, 4, 9, 11, 5, 14, 21, 23, 6, 17, 25, 27, 7, 24, 43, 53, 55, 8, 29, 54, 68, 71, 9, 36, 73, 97, 103, 10, 41, 83, 109, 115, 11, 52, 125, 193, 225, 231, 12, 57, 136, 208, 241, 247, 13, 70, 194, 345, 450, 489, 495, 14, 77, 215, 382, 496, 537, 543
Offset: 1
T(5,3) = 21 because there are 21 nonempty subsets of {1,2,3,4,5} having <=3 pairwise coprime elements: {1}, {2}, {3}, {4}, {5}, {1,2}, {1,3}, {1,4}, {1,5}, {2,3}, {2,5}, {3,4}, {3,5}, {4,5}, {1,2,3}, {1,2,5}, {1,3,4}, {1,3,5}, {1,4,5}, {2,3,5}, {3,4,5}.
Irregular Triangle T(n,k) begins:
1;
2, 3;
3, 6, 7;
4, 9, 11;
5, 14, 21, 23;
6, 17, 25, 27;
7, 24, 43, 53, 55;
Rightmost elements of rows give
A187106.
A186973
Number of subsets of {1, 2, ..., n} containing n and having pairwise coprime elements; also row sums of A186972.
Original entry on oeis.org
1, 2, 4, 4, 12, 4, 28, 16, 32, 12, 116, 16, 248, 48, 72, 112, 728, 64, 1520, 192, 384, 256, 3872, 256, 3168, 736, 2752, 832, 15488, 256, 31232, 7424, 6272, 4096, 9600, 1792, 91648, 9344, 16000, 5632, 214272, 3072, 431616, 37376, 38912, 43008, 982528
Offset: 1
a(6) = 4 because there are 4 subsets of {1,2,3,4,5,6} containing 6 and having pairwise coprime elements: {6}, {1,6}, {5,6}, {1,5,6}.
-
with(numtheory):
s:= proc(m, r) option remember; mul(`if`(i mul(ilog[j](n), j={ithprime(i)$i=1..pi(n)} minus factorset(n)):
b:= proc(t, n, k) option remember; local c, d, h;
if k=0 or k>n then 0
elif k=1 then 1
elif k=2 and t=n then `if`(n<2, 0, phi(n))
else c:= 0;
d:= 2-irem(t, 2);
for h from 1 to n-1 by d do
if igcd(t, h)=1 then c:= c +b(s(t*h, h), h, k-1) fi
end; c
fi
end:
a:= n-> h(n) + add(b(s(n, n), n, k), k=1..g(n)-1):
seq(a(n), n=1..50);
-
s[m_, r_] := s[m, r] = Product[If[in, 0, k == 1, 1, k == 2 && t == n, If[n<2, 0, EulerPhi[n]], True, c=0; d=2-Mod[t, 2]; For[h=1, h <= n-1, h=h+d, If[GCD[t, h] == 1, c=c+b[s[t*h, h], h, k-1]]]; c]]; t[n_, k_] := t[n, k] = b[s[n, n], n, k]; Table[Sum[t[n, k], {k, 1, a[n]}], {n, 1, 50}] (* Jean-François Alcover, Dec 04 2014, after Alois P. Heinz *)
A186987
Number of subsets of {1, 2, ..., n} containing n and having <=3 pairwise coprime elements.
Original entry on oeis.org
1, 2, 4, 4, 10, 4, 18, 11, 19, 10, 42, 11, 58, 21, 30, 33, 96, 22, 120, 36, 62, 48, 172, 37, 147, 69, 128, 70, 270, 37, 308, 123, 158, 117, 208, 75, 432, 147, 218, 119, 530, 78, 584, 186, 228, 212, 696, 133, 594, 191, 380, 256, 882, 166, 547
Offset: 1
a(6) = 4 because there are 4 subsets of {1,2,3,4,5,6} containing 6 and having <=3 pairwise coprime elements: {6}, {1,6}, {5,6}, {1,5,6}.
A186988
Number of subsets of {1, 2, ..., n} containing n and having <=4 pairwise coprime elements.
Original entry on oeis.org
1, 2, 4, 4, 12, 4, 26, 15, 29, 12, 84, 15, 137, 37, 55, 69, 279, 42, 397, 86, 162, 118, 663, 93, 546, 208, 468, 216, 1286, 93, 1593, 521, 651, 459, 914, 259, 2582, 648, 1025, 482, 3498, 288, 4106, 961, 1163, 1116, 5316, 641, 4326, 1033
Offset: 1
a(5) = 12 because there are 12 subsets of {1,2,3,4,5} containing 5 and having <=4 pairwise coprime elements: {5}, {1,5}, {2,5}, {3,5}, {4,5}, {1,2,5}, {1,3,5}, {1,4,5}, {2,3,5}, {3,4,5}, {1,2,3,5}, {1,3,4,5}.
A186989
Number of subsets of {1, 2, ..., n} containing n and having <=5 pairwise coprime elements.
Original entry on oeis.org
1, 2, 4, 4, 12, 4, 28, 16, 32, 12, 110, 16, 209, 46, 69, 98, 507, 57, 828, 141, 277, 193, 1591, 163, 1289, 413, 1101, 441, 3785, 163, 5164, 1479, 1736, 1187, 2540, 609, 9561, 1879, 3086, 1304, 14298, 738, 18084, 3322, 3913, 3888, 25430
Offset: 1
a(10) = 12 because there are 12 subsets of {1, 2, ..., 10} containing 10 and having <=5 pairwise coprime elements: {10}, {1,10}, {3,10}, {7,10}, {9,10}, {1,3,10}, {1,7,10}, {1,9,10}, {3,7,10}, {7,9,10}, {1,3,7,10}, {1,7,9,10}. There is no subset with exactly 5 elements here.
A186990
Number of subsets of {1, 2, ..., n} containing n and having <=6 pairwise coprime elements.
Original entry on oeis.org
1, 2, 4, 4, 12, 4, 28, 16, 32, 12, 116, 16, 242, 48, 72, 110, 664, 63, 1228, 177, 353, 239, 2667, 219, 2155, 599, 1847, 657, 7665, 219, 11613, 3047, 3297, 2209, 4946, 1057, 24328, 3902, 6551, 2564, 40158, 1410, 55194, 8308, 9490
Offset: 1
A186991
Number of subsets of {1, 2, ..., n} containing n and having <=7 pairwise coprime elements.
Original entry on oeis.org
1, 2, 4, 4, 12, 4, 28, 16, 32, 12, 116, 16, 248, 48, 72, 112, 720, 64, 1447, 190, 380, 254, 3444, 247, 2795, 701, 2410, 784, 11588, 247, 19472, 4839, 4802, 3175, 7300, 1449, 45641, 6191, 10520, 3908, 82986, 2124, 124554, 15874, 17608
Offset: 1
A186992
Number of subsets of {1, 2, ..., n} containing n and having <=8 pairwise coprime elements.
Original entry on oeis.org
1, 2, 4, 4, 12, 4, 28, 16, 32, 12, 116, 16, 248, 48, 72, 112, 728, 64, 1512, 192, 384, 256, 3783, 255, 3086, 732, 2674, 826, 14164, 255, 25999, 6275, 5769, 3785, 8818, 1681, 67036, 7984, 13643, 4910, 133296, 2664, 218406, 24268, 26254
Offset: 1
A186993
Number of subsets of {1, 2, ..., n} containing n and having <=9 pairwise coprime elements.
Original entry on oeis.org
1, 2, 4, 4, 12, 4, 28, 16, 32, 12, 116, 16, 248, 48, 72, 112, 728, 64, 1520, 192, 384, 256, 3864, 256, 3160, 736, 2744, 832, 15220, 256, 29639, 7068, 6167, 4032, 9439, 1770, 81966, 8940, 15305, 5423, 175539, 2949, 311499, 31099, 33019
Offset: 1
Showing 1-9 of 9 results.
Comments