A325095 Number of subsets of {1...n} with no binary carries.
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
Examples
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}
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..16383
Crossrefs
Programs
-
Maple
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
-
Mathematica
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}]
Formula
a(2^n - 1) = A000110(n + 1).
Extensions
a(16)-a(55) from Alois P. Heinz, Mar 28 2019
Comments