A196723
Number of subsets of {1..n} (including empty set) such that the pairwise sums of distinct elements are all distinct.
Original entry on oeis.org
1, 2, 4, 8, 15, 28, 50, 86, 143, 236, 376, 594, 913, 1380, 2048, 3016, 4367, 6302, 8974, 12670, 17685, 24580, 33738, 46072, 62367, 83990, 112342, 149734, 198153, 261562, 343210, 448694, 583445, 756846, 976086, 1255658, 1607831, 2053186, 2610560, 3312040, 4183689
Offset: 0
a(4) = 15: {}, {1}, {2}, {3}, {4}, {1,2}, {1,3}, {1,4}, {2,3}, {2,4}, {3,4}, {1,2,3}, {1,2,4}, {1,3,4}, {2,3,4}.
The subset case is
A196723 (this sequence).
The integer partition case is
A325857.
The strict integer partition case is
A325877.
Heinz numbers of the counterexamples are given by
A325991.
-
b:= proc(n, s) local sn, m;
m:= nops(s);
sn:= [s[], n];
`if`(n<1, 1, b(n-1, s) +`if`(m*(m+1)/2 = nops(({seq(seq(
sn[i]+sn[j], j=i+1..m+1), i=1..m)})), b(n-1, sn), 0))
end:
a:= proc(n) option remember;
b(n-1, [n]) +`if`(n=0, 0, a(n-1))
end:
seq(a(n), n=0..20);
-
b[n_, s_] := b[n, s] = Module[{sn, m}, m = Length[s]; sn = Append[s, n]; If[n<1, 1, b[n-1, s] + If[m*(m+1)/2 == Length[ Union[ Flatten[ Table[ sn[[i]] + sn[[j]], {i, 1, m}, {j, i+1, m+1}]]]], b[n-1, sn], 0]]];
a[n_] := a[n] = b[n-1, {n}] + If[n == 0, 0, a[n-1]]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jan 31 2017, translated from Maple *)
Table[Length[Select[Subsets[Range[n]],UnsameQ@@Plus@@@Subsets[#,{2}]&]],{n,0,10}] (* Gus Wiseman, Jun 03 2019 *)
A196724
Number of subsets of {1..n} (including empty set) such that the pairwise products of distinct elements are all distinct.
Original entry on oeis.org
1, 2, 4, 8, 16, 32, 58, 116, 212, 416, 720, 1440, 2340, 4680, 7920, 13024, 23328, 46656, 74168, 148336, 229856, 371424, 615304, 1230608, 1780224, 3401568, 5589360, 9468504, 14397744, 28795488, 40312128, 80624256, 131388480, 206363168, 335814288, 521401536
Offset: 0
a(6) = 58: from the 2^6=64 subsets of {1,2,3,4,5,6} only 6 do not have all the pairwise products of elements distinct: {1,2,3,6}, {2,3,4,6}, {1,2,3,4,6}, {1,2,3,5,6}, {2,3,4,5,6}, {1,2,3,4,5,6}.
The subset case is
A196724 (this sequence).
The integer partition case is
A325856.
The strict integer partition case is
A325855.
Heinz numbers of the counterexamples are given by
A325993.
-
b:= proc(n, s) local sn, m;
m:= nops(s);
sn:= [s[], n];
`if`(n<1, 1, b(n-1, s) +`if`(m*(m+1)/2 = nops(({seq(seq(
sn[i]*sn[j], j=i+1..m+1), i=1..m)})), b(n-1, sn), 0))
end:
a:= proc(n) option remember;
b(n-1, [n]) +`if`(n=0, 0, a(n-1))
end:
seq(a(n), n=0..20);
-
b[n_, s_] := b[n, s] = Module[{sn, m}, m = Length[s]; sn = Append[s, n]; If[n < 1, 1, b[n - 1, s] + If[m*(m + 1)/2 == Length[Union[Flatten[Table[ sn[[i]] * sn[[j]], {i, 1, m}, {j, i + 1, m + 1}]]]], b[n - 1, sn], 0]]]; a[n_] := a[n] = b[n - 1, {n}] + If[n == 0, 0, a[n - 1]]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jan 31 2017, translated from Maple *)
Table[Length[Select[Subsets[Range[n]],UnsameQ@@Times@@@Subsets[#,{2}]&]],{n,0,10}] (* Gus Wiseman, Jun 03 2019 *)
A196719
Number of subsets of {1..n} (including empty set) such that the pairwise GCDs of elements are all distinct.
Original entry on oeis.org
1, 2, 4, 7, 11, 16, 24, 31, 40, 52, 68, 79, 102, 115, 140, 175, 201, 218, 265, 284, 336, 396, 446, 469, 547, 599, 662, 742, 837, 866, 1034, 1065, 1153, 1275, 1370, 1511, 1719, 1756, 1869, 2030, 2244, 2285, 2613, 2656, 2865, 3236, 3394, 3441, 3780, 3921, 4232
Offset: 0
a(6) = 24: {}, {1}, {2}, {3}, {4}, {5}, {6}, {1,2}, {1,3}, {1,4}, {1,5}, {1,6}, {2,3}, {2,4}, {2,5}, {2,6}, {3,4}, {3,5}, {3,6}, {4,5}, {4,6}, {5,6}, {2,3,6}, {3,4,6}.
-
b:= proc(n, s) local sn, m;
m:= nops(s);
sn:= [s[], n];
`if`(n<1, 1, b(n-1, s) +`if`(m*(m+1)/2 = nops(({seq(seq(
igcd(sn[i], sn[j]), j=i+1..m+1), i=1..m)})), b(n-1, sn), 0))
end:
a:= proc(n) option remember;
b(n-1, [n]) +`if`(n=0, 0, a(n-1))
end:
seq(a(n), n=0..50);
-
b[n_, s_] := b[n, s] = With[{m = Length[s], sn = Append[s, n]}, If[n<1, 1, b[n-1, s] + If[m*(m+1)/2 == Length[ Union @ Flatten @ Table[ Table[ GCD[ sn[[i]], sn[[j]]], {j, i+1, m+1}], {i, 1, m}]], b[n-1, sn], 0]]];
a[n_] := a[n] = b[n-1, {n}] + If[n == 0, 0, a[n-1]];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Apr 06 2017, translated from Maple *)
A196720
Number of subsets of {1..n} (including empty set) such that the pairwise GCDs of elements are not distinct.
Original entry on oeis.org
1, 2, 4, 8, 13, 25, 33, 61, 81, 116, 140, 256, 282, 530, 606, 692, 823, 1551, 1653, 3173, 3391, 3805, 4177, 8049, 8345, 11524, 12508, 15294, 16204, 31692, 32048, 63280, 70834, 77224, 82048, 91686, 93597, 185245, 196109, 212359, 218223, 432495, 436031, 867647
Offset: 0
a(5) = 25: {}, {1}, {2}, {3}, {4}, {5}, {1,2}, {1,3}, {1,4}, {1,5}, {2,3}, {2,4}, {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}, {1,2,3,5}, {1,3,4,5}.
-
b:= proc(n, s) local sn, m;
m:= nops(s);
sn:= [s[], n];
`if`(n<1, 1, b(n-1, s) +`if`(1 >= nops(({seq(seq(
igcd(sn[i], sn[j]), j=i+1..m+1), i=1..m)})), b(n-1, sn), 0))
end:
a:= proc(n) option remember;
b(n-1, [n]) +`if`(n=0, 0, a(n-1))
end:
seq(a(n), n=0..20);
-
b[n_, s_] := b[n, s] = With[{m = Length[s], sn = Append[s, n]}, If[n<1, 1, b[n-1, s] + If[1 >= Length[ Union @ Flatten @ Table[ Table[ GCD[ sn[[i]], sn[[j]]], {j, i+1, m+1}], {i, 1, m}]], b[n-1, sn], 0]]];
a[n_] := a[n] = b[n-1, {n}] + If[n == 0, 0, a[n-1]];
Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Apr 06 2017, translated from Maple *)
A196722
Number of subsets of {1..n} (including empty set) such that the pairwise LCMs of elements are not distinct.
Original entry on oeis.org
1, 2, 4, 7, 11, 16, 23, 30, 38, 47, 58, 69, 83, 96, 111, 128, 144, 161, 181, 200, 223, 246, 269, 292, 319, 344, 371, 398, 429, 458, 496, 527, 559, 594, 629, 668, 708, 745, 784, 825, 870, 911, 962, 1005, 1052, 1102, 1149, 1196, 1248, 1297, 1349, 1402, 1457, 1510
Offset: 0
A(6) = 23: {}, {1}, {2}, {3}, {4}, {5}, {6}, {1,2}, {1,3}, {1,4}, {1,5}, {1,6}, {2,3}, {2,4}, {2,5}, {2,6}, {3,4}, {3,5}, {3,6}, {4,5}, {4,6}, {5,6}, {2,3,6}.
-
b:= proc(n, s) local sn, m;
m:= nops(s);
sn:= [s[], n];
`if`(n<1, 1, b(n-1, s) +`if`(1 >= nops(({seq(seq(
ilcm(sn[i], sn[j]), j=i+1..m+1), i=1..m)})), b(n-1, sn), 0))
end:
a:= proc(n) option remember;
b(n-1, [n]) +`if`(n=0, 0, a(n-1))
end:
seq(a(n), n=0..50);
-
b[n_, s_] := b[n, s] = Module[{sn, m}, m = Length[s]; sn = Append[s, n]; If[n<1, 1, b[n-1, s] + If[1 >= Length @ Union @ Flatten @ Table[ LCM[ sn[[i]], sn[[j]]], {i, 1, m}, {j, i+1, m+1}], b[n-1, sn], 0]]];
a[n_] := a[n] = b[n-1, {n}] + If[n == 0, 0, a[n-1]];
Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Apr 12 2017, translated from Maple *)
Showing 1-5 of 5 results.
Comments