OFFSET
1,2
COMMENTS
2^(floor(n/2)) <= a(n) <= 2^n.
EXAMPLE
a(4)=6 because {1}, {1,2}, {1,3}, {1,4}, {1,2,3} and {1,2,4} have difference sets {}, {1}, {2}, {3}, {1,2}, {1,2,3}, respectively and all 2^4 subsets of {1,2,3,4} have one of these difference sets.
MATHEMATICA
SetToNumber = Compile[{{A, _Integer, 1}, {LP, _Integer}}, Plus @@ (2^Union[Flatten[Table[If[i > j, A[[i]] - A[[j]], 0], {j, LP}, {i, LP}]]])]; GetSetA = Compile[{{n, _Integer}}, Flatten[Position[IntegerDigits[n, 2], 1]]]; DS[n_] := Module[{LP, A}, A = GetSetA[n]; LP = Length[A]; SetToNumber[A, LP]]; newfset[d_] := Union[Table[DS[n], {n, 2^(d - 1) + 1, 2^d - 1, 2}]]; newf[d_] := newf[d] = Length[newfset[d]]; a[2] = 2; a[d_] := a[d] = newf[d] + a[d - 1];
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Kevin O'Bryant, Mar 10 2002
EXTENSIONS
a(27)-a(33) from Sean A. Irvine, Dec 10 2023
STATUS
approved