# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a306299 Showing 1-1 of 1 %I A306299 #29 May 10 2020 08:38:17 %S A306299 1,1,1,4,1,12,28,64,1,212,452,960,1972,4032,8128,16384,1,64284,129260, %T A306299 259904,520636,1043264,2087744,4177920,8381836,16768832,33541952, %U A306299 67092480,134201152,268419072,536854528,1073741824,1,4294569380,8589336404,17179068096 %N A306299 Number of binary carry-connected subsets of [n] containing n (for n > 0). %C A306299 Two integers are binary carry-connected if their bitwise AND is not zero. %C A306299 For n = 0 the carry-connected subset is the empty set. %H A306299 Alois P. Heinz, Table of n, a(n) for n = 0..1024 %H A306299 Wikipedia, Bitwise operation %H A306299 Wikipedia, Partition of a set %F A306299 a(n) = A325105(n) - A325105(n-1) for n > 0, a(0) = 1. %F A306299 a(n) = 1 <=> n in { A131577 }. %F A306299 a(n) mod 4 = 0 <=> not (n in { A131577 }). %p A306299 h:= proc(n, s) local i, m; m:= n; %p A306299 for i in s do m:= Bits[Or](m, i) od; {m} %p A306299 end: %p A306299 g:= (n, s)-> (w-> `if`(w={}, s union {n}, s minus w union %p A306299 h(n, w)))(select(x-> Bits[And](n, x)>0, s)): %p A306299 b:= proc(n, s) option remember; `if`(n=0, %p A306299 `if`(nops(s)>1, 0, 1), b(n-1, s)+b(n-1, g(n, s))) %p A306299 end: %p A306299 a:= n-> `if`(n=0, 1, b(n-1, {n})): %p A306299 seq(a(n), n=0..42); %t A306299 h[n_, s_] := Module[{i, m = n}, Do[m = BitOr[m, i], {i, s}]; {m}]; %t A306299 g[n_, s_] := Function[w, If[w == {}, s ~Union~ {n}, s ~Complement~ w ~Union~ h[n, w]]][Select[s, BitAnd[n, #] > 0&]]; %t A306299 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]]]; %t A306299 a[n_] := If[n == 0, 1, b[n - 1, {n}]]; %t A306299 a /@ Range[0, 42] (* _Jean-François Alcover_, May 10 2020, after Maple *) %Y A306299 Partial differences of A325105. %Y A306299 Cf. A131577. %K A306299 nonn %O A306299 0,4 %A A306299 _Alois P. Heinz_, Mar 31 2019 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE