Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A093970
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A093970 Number of subsets A of {1,...,n} such that there are no solutions to a+b+c=d for a,b,c,d in A. +0
2
1, 2, 4, 6, 11, 21, 31, 55, 99, 145, 252, 430, 620, 1042, 1786, 2597, 4304, 7241, 10374, 17098, 28967 (list; graph; listen)
OFFSET

0,2

COMMENT

In sumset notation, 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

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

Cf. A007865 (number of sum-free subsets of 1..n).

Sequence in context: A068330 A017993 A049870 this_sequence A107428 A086379 A096460

Adjacent sequences: A093967 A093968 A093969 this_sequence A093971 A093972 A093973

KEYWORD

nonn

AUTHOR

T. D. Noe (noe(AT)sspectra.com), Apr 20 2004

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 27 22:38 EST 2009. Contains 167602 sequences.


AT&T Labs Research