显示1-1个结果(共1个)。
第页1
1, 1, 2, 2, 4, 4, 7, 7, 13, 15, 23, 27, 42, 50, 72, 88, 125, 153, 211, 258, 349, 430, 569, 698, 914, 1119, 1444, 1765, 2252, 2745, 3470, 4214, 5276, 6387, 7934, 9568, 11800, 14181, 17379, 20818, 25351, 30264, 36668, 43633, 52589, 62394, 74872, 88576, 105818
评论
两个正整数的二进制进位是1在其反向二进制展开中位置的重叠。如果顶点为部分且边为二进制进位的图是连通的,则整数分区是二进制进位连通的。
例子
a(1)=1到a(8)=13分区:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (111) (22) (32) (33) (322) (44)
(31) (311) (51) (331) (53)
(1111) (11111) (222) (511) (62)
(321) (3211) (71)
(3111) (31111) (332)
(111111) (1111111) (2222)
(3221)
(3311)
(5111)
(32111)
(311111)
(11111111)
MAPLE公司
h: =proc(n,s)局部i,m;m: =n;
对于s中的i,do m:=位[或](m,i)od;{米}
结束时间:
g: =(n,s)->(w->`if`(w={},s并集{n},s-减去w并集
h(n,w))(选择(x->位[和](n,x)>0,s)):
b: =proc(n,i,s)选项记忆`如果`(n=0,`if`(nops(s)>1,0,1),
`如果`(i<1,0,b(n,i-1,s)+b(n-i,min(i,n-i),g(i,s)))
结束时间:
a: =n->b(n$2,{}):
数学
binpos[n_]:=连接@@Position[Reverse[IntegerDigits[n,2]],1];
csm[s_]:=使用[{c=Select[Tuples[Range[Length[s]],2],And[OrderedQ[#],UnsameQ@@#,Length[Intersection@@s[[#]]>0]&]},如果[c=={},s,csm[Sort[Append[Delete[s,List/@c[[1]]],Union@@s[[c[1]]]]];
表[Length[Select[Integer Partitions[n],Length[csm[binpos/@#]]<=1&]],{n,0,20}]
(*第二个程序:*)
h[n_,s_]:=模[{i,m=n},Do[m=BitOr[m,i],{i,s}];{m} ];
g[n_,s_]:=函数[w,如果[w=={},s~并~{n},(s~补~w)~并~
h[n,w]]][选择[s,BitAnd[n,#]>0&]];
b[n_,i_,s_]:=b[n,i,s]=如果[n==0,如果[Length[s]>1,0,1],
如果[i<1,0,b[n,i-1,s]+b[n-i,Min[i,n-i],g[i,s]]];
a[n_]:=b[n,n,{}];
搜索在0.004秒内完成
|