OFFSET
0,2
COMMENTS
In sumset notation, the sequence gives the number of subsets A of {1..n} such that the intersection of A and 3A is empty. Using the Mathematica program, all such subsets can be printed.
LINKS
Fausto A. C. Cariboni, Table of n, a(n) for n = 0..62
Eric Weisstein's World of Mathematics, Sum-Free Set
MATHEMATICA
nn=20; SumFree3Q[s_List] := Module[{sumFree, i, j, k}, If[Length[s]<2, True, If[3s[[1]]>s[[ -1]], True, sumFree=True; i=1; While[sumFree&&i<=Length[s], j=i; While[sumFree&&j<=Length[s], k=j; While[sumFree&&k<=Length[s], sumFree=!MemberQ[s, s[[i]]+s[[j]]+s[[k]]]; k++ ]; j++ ]; i++ ]; sumFree]]]; ss={{}}; Table[If[n>0, ssNew={}; Do[t=Append[ss[[i]], n]; If[SumFree3Q[t], AppendTo[ssNew, t]], {i, Length[ss]}]; ss=Join[ss, ssNew]]; Length[ss], {n, 0, nn}]
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Apr 20 2004
EXTENSIONS
a(21)-a(38) from Fausto A. C. Cariboni, Sep 30 2020
STATUS
approved