A325118
Heinz numbers of binary carry-connected integer partitions.
Original entry on oeis.org
1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 15, 16, 17, 19, 20, 22, 23, 25, 27, 29, 30, 31, 32, 34, 37, 39, 40, 41, 43, 44, 45, 46, 47, 49, 50, 51, 53, 55, 59, 60, 61, 62, 64, 65, 67, 68, 71, 73, 75, 77, 79, 80, 81, 82, 83, 85, 87, 88, 89, 90, 91, 92, 93, 94, 97, 100
Offset: 1
The sequence of terms together with their prime indices begins:
1: {}
2: {1}
3: {2}
4: {1,1}
5: {3}
7: {4}
8: {1,1,1}
9: {2,2}
10: {1,3}
11: {5}
13: {6}
15: {2,3}
16: {1,1,1,1}
17: {7}
19: {8}
20: {1,1,3}
22: {1,5}
23: {9}
25: {3,3}
27: {2,2,2}
29: {10}
-
binpos[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
csm[s_]:=With[{c=Select[Tuples[Range[Length[s]],2],And[OrderedQ[#],UnsameQ@@#,Length[Intersection@@s[[#]]]>0]&]},If[c=={},s,csm[Sort[Append[Delete[s,List/@c[[1]]],Union@@s[[c[[1]]]]]]]]];
Select[Range[100],Length[csm[binpos/@PrimePi/@First/@FactorInteger[#]]]<=1&]
A325095
Number of subsets of {1...n} with no binary carries.
Original entry on oeis.org
1, 2, 4, 5, 10, 12, 14, 15, 30, 35, 40, 42, 47, 49, 51, 52, 104, 119, 134, 139, 154, 159, 164, 166, 181, 186, 191, 193, 198, 200, 202, 203, 406, 458, 510, 525, 577, 592, 607, 612, 664, 679, 694, 699, 714, 719, 724, 726, 778, 793, 808, 813, 828, 833, 838, 840
Offset: 0
The a(1) = 1 through a(7) = 15 subsets:
{} {} {} {} {} {} {}
{1} {1} {1} {1} {1} {1} {1}
{2} {2} {2} {2} {2} {2}
{1,2} {3} {3} {3} {3} {3}
{1,2} {4} {4} {4} {4}
{1,2} {5} {5} {5}
{1,4} {1,2} {6} {6}
{2,4} {1,4} {1,2} {7}
{3,4} {2,4} {1,4} {1,2}
{1,2,4} {2,5} {1,6} {1,4}
{3,4} {2,4} {1,6}
{1,2,4} {2,5} {2,4}
{3,4} {2,5}
{1,2,4} {3,4}
{1,2,4}
-
b:= proc(n, t) option remember; `if`(n=0, 1, b(n-1, t)+
`if`(Bits[And](n, t)=0, b(n-1, Bits[Or](n, t)), 0))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..63); # Alois P. Heinz, Mar 28 2019
-
binpos[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
stableQ[u_,Q_]:=!Apply[Or,Outer[#1=!=#2&&Q[#1,#2]&,u,u,1],{0,1}];
Table[Length[Select[Subsets[Range[n]],stableQ[#,Intersection[binpos[#1],binpos[#2]]!={}&]&]],{n,0,10}]
A325107
Number of subsets of {1...n} with no binary containments.
Original entry on oeis.org
1, 2, 4, 5, 10, 13, 18, 19, 38, 52, 77, 83, 133, 147, 166, 167, 334, 482, 764, 848, 1465, 1680, 1987, 2007, 3699, 4413, 5488, 5572, 7264, 7412, 7579, 7580, 15160, 22573, 37251, 42824, 77387, 92863, 116453, 118461, 227502, 286775, 382573, 392246, 555661, 574113
Offset: 0
The a(0) = 1 through a(6) = 18 subsets:
{} {} {} {} {} {} {}
{1} {1} {1} {1} {1} {1}
{2} {2} {2} {2} {2}
{1,2} {3} {3} {3} {3}
{1,2} {4} {4} {4}
{1,2} {5} {5}
{1,4} {1,2} {6}
{2,4} {1,4} {1,2}
{3,4} {2,4} {1,4}
{1,2,4} {2,5} {1,6}
{3,4} {2,4}
{3,5} {2,5}
{1,2,4} {3,4}
{3,5}
{3,6}
{5,6}
{1,2,4}
{3,5,6}
-
c:= proc() option remember; local i, x, y;
x, y:= map(n-> Bits[Split](n), [args])[];
for i to nops(x) do
if x[i]=1 and y[i]=0 then return false fi
od; true
end:
b:= proc(n, s) option remember; `if`(n=0, 1, b(n-1, s)+
`if`(ormap(i-> c(n, i), s), 0, b(n-1, s union {n})))
end:
a:= n-> b(n, {}):
seq(a(n), n=0..34); # Alois P. Heinz, Mar 28 2019
-
binpos[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
stableQ[u_,Q_]:=!Apply[Or,Outer[#1=!=#2&&Q[#1,#2]&,u,u,1],{0,1}];
Table[Length[Select[Subsets[Range[n]],stableQ[#,SubsetQ[binpos[#1],binpos[#2]]&]&]],{n,0,13}]
A325119
Heinz numbers of binary carry-connected strict integer partitions.
Original entry on oeis.org
1, 2, 3, 5, 7, 10, 11, 13, 15, 17, 19, 22, 23, 29, 30, 31, 34, 37, 39, 41, 43, 46, 47, 51, 53, 55, 59, 61, 62, 65, 67, 71, 73, 77, 79, 82, 83, 85, 87, 89, 91, 93, 94, 97, 101, 102, 103, 107, 109, 110, 113, 115, 118, 119, 127, 129, 130, 131, 134, 137, 139, 141
Offset: 1
The sequence of terms together with their prime indices begins:
1: {}
2: {1}
3: {2}
5: {3}
7: {4}
10: {1,3}
11: {5}
13: {6}
15: {2,3}
17: {7}
19: {8}
22: {1,5}
23: {9}
29: {10}
30: {1,2,3}
31: {11}
34: {1,7}
37: {12}
39: {2,6}
41: {13}
43: {14}
-
binpos[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
csm[s_]:=With[{c=Select[Tuples[Range[Length[s]],2],And[OrderedQ[#],UnsameQ@@#,Length[Intersection@@s[[#]]]>0]&]},If[c=={},s,csm[Sort[Append[Delete[s,List/@c[[1]]],Union@@s[[c[[1]]]]]]]]];
Select[Range[100],SquareFreeQ[#]&&Length[csm[binpos/@PrimePi/@First/@FactorInteger[#]]]<=1&]
A325123
Number of divisible pairs of positive integers up to n with no binary carries.
Original entry on oeis.org
0, 0, 1, 1, 3, 3, 4, 4, 7, 7, 9, 9, 12, 12, 13, 13, 17, 17, 19, 19, 22, 22, 23, 23, 28, 28, 29, 29, 31, 31, 32, 32, 37, 37, 39, 39, 44, 44, 45, 45, 50, 50, 52, 52, 54, 54, 55, 55, 62, 62, 64, 64, 66, 66, 68, 68, 72, 72, 73, 73, 76, 76, 77, 77, 83, 83, 85, 85
Offset: 0
The a(2) = 1 through a(11) = 9 pairs:
{1,2} {1,2} {1,2} {1,2} {1,2} {1,2} {1,2} {1,2} {1,2} {1,2}
{1,4} {1,4} {1,4} {1,4} {1,4} {1,4} {1,4} {1,4}
{2,4} {2,4} {1,6} {1,6} {1,6} {1,6} {1,6} {1,6}
{2,4} {2,4} {1,8} {1,8} {1,8} {1,8}
{2,4} {2,4} {2,4} {2,4}
{2,8} {2,8} {2,8} {2,8}
{4,8} {4,8} {4,8} {4,8}
{1,10} {1,10}
{5,10} {5,10}
-
Table[Length[Select[Tuples[Range[n],2],Divisible@@Reverse[#]&&Intersection[Position[Reverse[IntegerDigits[#[[1]],2]],1],Position[Reverse[IntegerDigits[#[[2]],2]],1]]=={}&]],{n,0,20}]
A371445
Numbers whose distinct prime indices are binary carry-connected and have no binary containments.
Original entry on oeis.org
2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, 47, 49, 53, 55, 59, 61, 64, 65, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 115, 121, 125, 127, 128, 131, 137, 139, 143, 145, 149, 151, 157, 163, 167, 169, 173, 179, 181
Offset: 1
The terms together with their prime indices begin:
2: {1} 37: {12} 97: {25}
3: {2} 41: {13} 101: {26}
4: {1,1} 43: {14} 103: {27}
5: {3} 47: {15} 107: {28}
7: {4} 49: {4,4} 109: {29}
8: {1,1,1} 53: {16} 113: {30}
9: {2,2} 55: {3,5} 115: {3,9}
11: {5} 59: {17} 121: {5,5}
13: {6} 61: {18} 125: {3,3,3}
16: {1,1,1,1} 64: {1,1,1,1,1,1} 127: {31}
17: {7} 65: {3,6} 128: {1,1,1,1,1,1,1}
19: {8} 67: {19} 131: {32}
23: {9} 71: {20} 137: {33}
25: {3,3} 73: {21} 139: {34}
27: {2,2,2} 79: {22} 143: {5,6}
29: {10} 81: {2,2,2,2} 145: {3,10}
31: {11} 83: {23} 149: {35}
32: {1,1,1,1,1} 89: {24} 151: {36}
Contains all powers of primes
A000961 except 1.
Partitions of this type are counted by
A371446.
A007718 counts non-isomorphic connected multiset partitions.
A048143 counts connected antichains of sets.
A070939 gives length of binary expansion.
Cf.
A019565,
A056239,
A112798,
A304713,
A304716,
A305079,
A305148,
A325097,
A325105,
A325107,
A325119,
A371452.
-
stableQ[u_,Q_]:=!Apply[Or,Outer[#1=!=#2&&Q[#1,#2]&,u,u,1],{0,1}];
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n], {p_,k_}:>Table[PrimePi[p],{k}]]]];
csm[s_]:=With[{c=Select[Subsets[Range[Length[s]],{2}], Length[Intersection@@s[[#]]]>0&]},If[c=={},s,csm[Sort[Append[Delete[s,List/@c[[1]]], Union@@s[[c[[1]]]]]]]]];
Select[Range[100],stableQ[bpe/@prix[#],SubsetQ] && Length[csm[bpe/@prix[#]]]==1&]
A325124
Number of divisible pairs of positive integers up to n with at least one binary carry.
Original entry on oeis.org
0, 1, 2, 4, 5, 7, 10, 12, 13, 16, 18, 20, 23, 25, 28, 32, 33, 35, 39, 41, 44, 48, 51, 53, 56, 59, 62, 66, 70, 72, 79, 81, 82, 86, 88, 92, 96, 98, 101, 105, 108, 110, 116, 118, 122, 128, 131, 133, 136, 139, 143, 147, 151, 153, 159, 163, 167, 171, 174, 176, 185
Offset: 0
The a(1) = 1 through a(8) = 13 pairs:
(1,1) (1,1) (1,1) (1,1) (1,1) (1,1) (1,1) (1,1)
(2,2) (1,3) (1,3) (1,3) (1,3) (1,3) (1,3)
(2,2) (2,2) (1,5) (1,5) (1,5) (1,5)
(3,3) (3,3) (2,2) (2,2) (1,7) (1,7)
(4,4) (3,3) (2,6) (2,2) (2,2)
(4,4) (3,3) (2,6) (2,6)
(5,5) (3,6) (3,3) (3,3)
(4,4) (3,6) (3,6)
(5,5) (4,4) (4,4)
(6,6) (5,5) (5,5)
(6,6) (6,6)
(7,7) (7,7)
(8,8)
-
Table[Length[Select[Tuples[Range[n],2],Divisible@@Reverse[#]&&Intersection[Position[Reverse[IntegerDigits[#[[1]],2]],1],Position[Reverse[IntegerDigits[#[[2]],2]],1]]!={}&]],{n,0,20}]
A371446
Number of carry-connected integer partitions whose distinct parts have no binary containments.
Original entry on oeis.org
1, 1, 2, 2, 3, 2, 4, 2, 5, 4, 4, 4, 8, 4, 7, 7, 12, 10, 14, 12, 15, 19, 19, 21, 32, 27, 33, 40, 46, 47, 61, 52, 75, 89, 95, 104, 129, 129, 149, 176, 188, 208, 249, 257, 296, 341, 373, 394, 476, 496, 552
Offset: 0
The a(12) = 8 through a(14) = 7 partitions:
(12) (13) (14)
(6,6) (10,3) (7,7)
(9,3) (5,5,3) (9,5)
(4,4,4) (1,1,1,1,1,1,1,1,1,1,1,1,1) (6,5,3)
(6,3,3) (5,3,3,3)
(3,3,3,3) (2,2,2,2,2,2,2)
(2,2,2,2,2,2) (1,1,1,1,1,1,1,1,1,1,1,1,1,1)
(1,1,1,1,1,1,1,1,1,1,1,1)
The first condition (carry-connected) is
A325098.
The second condition (stable) is
A325109.
A007718 counts non-isomorphic connected multiset partitions.
A048143 counts connected antichains of sets.
A070939 gives length of binary expansion.
-
stableQ[u_,Q_]:=!Apply[Or,Outer[#1=!=#2&&Q[#1,#2]&,u,u,1],{0,1}];
bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n], {p_,k_}:>Table[PrimePi[p],{k}]]]];
csm[s_]:=With[{c=Select[Subsets[Range[Length[s]],{2}], Length[Intersection@@s[[#]]]>0&]},If[c=={},s, csm[Sort[Append[Delete[s,List/@c[[1]]],Union@@s[[c[[1]]]]]]]]];
Table[Length[Select[IntegerPartitions[n], stableQ[bix/@Union[#],SubsetQ]&&Length[csm[bix/@#]]<=1&]],{n,0,30}]
A306297
Number T(n,k) of subsets of [n] with k binary carry-connected components; triangle T(n,k), n >= 0, 0 <= k <= A029837(n+1), read by rows.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 6, 1, 1, 7, 7, 1, 1, 19, 11, 1, 1, 47, 15, 1, 1, 111, 15, 1, 1, 112, 126, 16, 1, 1, 324, 166, 20, 1, 1, 776, 222, 24, 1, 1, 1736, 286, 24, 1, 1, 3708, 358, 28, 1, 1, 7740, 422, 28, 1, 1, 15868, 486, 28, 1, 1, 32252, 486, 28, 1, 1, 32253, 32738, 514, 29, 1
Offset: 0
T(4,0) = 1: {}.
T(4,1) = 7: 1, 2, 3, 13, 23, 123, 4.
T(4,2) = 7: 1|2, 1|4, 2|4, 3|4, 13|4, 23|4, 123|4.
T(4,3) = 1: 1|2|4.
(The connected components are shown as blocks of a set partition.)
Triangle T(n,k) begins:
1;
1, 1;
1, 2, 1;
1, 6, 1;
1, 7, 7, 1;
1, 19, 11, 1;
1, 47, 15, 1;
1, 111, 15, 1;
1, 112, 126, 16, 1;
1, 324, 166, 20, 1;
1, 776, 222, 24, 1;
1, 1736, 286, 24, 1;
1, 3708, 358, 28, 1;
...
Number of terms in row n gives
A070941.
-
h:= proc(n, s) local i, m; m:= n;
for i in s do m:= Bits[Or](m, i) od; {m}
end:
g:= (n, s)-> (w-> `if`(w={}, s union {n}, s minus w union
h(n, w)))(select(x-> Bits[And](n, x)>0, s)):
b:= proc(n, s) option remember; `if`(n=0, x^nops(s),
b(n-1, s)+b(n-1, g(n, s)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, {})):
seq(T(n), n=0..23);
-
h[n_, s_List] := Module[{i, m = n}, For[i = 1, i <= Length[s], i++, m = BitOr[m, s[[i]]]]; m];
g[n_, s_List] := Function[w, If[w == {}, s ~Union~ {n}, s ~Complement~ w ~Union~ {h[n, w]}]][Select[s, BitAnd[n, #] > 0&]];
b[n_, s_List] := b[n, s] = If[n == 0, x^Length[s], b[n - 1, s] + b[n - 1, g[n, s]]];
T[n_] := CoefficientList[b[n, {}], x];
T /@ Range[0, 23] // Flatten (* Jean-François Alcover, Apr 18 2021, after Alois P. Heinz *)
A306299
Number of binary carry-connected subsets of [n] containing n (for n > 0).
Original entry on oeis.org
1, 1, 1, 4, 1, 12, 28, 64, 1, 212, 452, 960, 1972, 4032, 8128, 16384, 1, 64284, 129260, 259904, 520636, 1043264, 2087744, 4177920, 8381836, 16768832, 33541952, 67092480, 134201152, 268419072, 536854528, 1073741824, 1, 4294569380, 8589336404, 17179068096
Offset: 0
-
h:= proc(n, s) local i, m; m:= n;
for i in s do m:= Bits[Or](m, i) od; {m}
end:
g:= (n, s)-> (w-> `if`(w={}, s union {n}, s minus w union
h(n, w)))(select(x-> Bits[And](n, x)>0, s)):
b:= proc(n, s) option remember; `if`(n=0,
`if`(nops(s)>1, 0, 1), b(n-1, s)+b(n-1, g(n, s)))
end:
a:= n-> `if`(n=0, 1, b(n-1, {n})):
seq(a(n), n=0..42);
-
h[n_, s_] := Module[{i, m = n}, Do[m = BitOr[m, i], {i, s}]; {m}];
g[n_, s_] := Function[w, If[w == {}, s ~Union~ {n}, s ~Complement~ w ~Union~ h[n, w]]][Select[s, BitAnd[n, #] > 0&]];
b[n_, s_] := b[n, s] = If[n == 0, If[Length[s] > 1, 0, 1], b[n - 1, s] + b[n - 1, g[n, s]]];
a[n_] := If[n == 0, 1, b[n - 1, {n}]];
a /@ Range[0, 42] (* Jean-François Alcover, May 10 2020, after Maple *)
Showing 1-10 of 11 results.
Comments