A241690 Number of Sidon subsets of {1,...,n} of size 6.
Keywords
Examples
a(18)=8 since there are 8 subsets of {1,...,18} satisfying the required conditions, for example {1,2,5,11,13,18}.
Programs
-
Mathematica
SidonQ[l__] := If[Length[Join[Plus @@@ Subsets[l, {2}], 2 l]] == Length[Union[Join[Plus @@@ Subsets[l, {2}], 2 l]]], True, False] Table[Length@Select[Subsets[Range[n], {6}], SidonQ[#] &], {n, 1, 30}]
Comments