|
Search: id:A113757
|
|
|
| A113757 |
|
Cardinality of a maximal subset S of {0,1,...,n-1} that does not contain x+y (mod n) or x*y (mod n) for x,y in S. |
|
+0 1
|
|
| 0, 0, 1, 1, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 6, 4, 4, 6, 4, 8, 7, 8, 6, 8
(list; graph; listen)
|
|
|
OFFSET
|
1,5
|
|
|
COMMENT
|
Examples of maximal subsets S(n) for n=3..21: S(3)={2}, S(4)={2}, S(5)={2,3}, S(6)={2,5}, S(7)={2,5}, S(8)={2,3}, S(9)={2,5,8}, S(10)={2,3,7,8}}, S(11)={2,5,6,9}, S(12)={2,5,8,11}, S(13)={2,3,10,11}, S(14)={2,3,11,12}, S(15)={2,3,7,8,12,13}, S(16)={2,3,10,11}, S(17)={2,3,8,15}, S(18)={2,5,8,11,14,17}, S(19)={2,3,8,12}}, S(20)={2,3,7,8,12,13,17,18}, S(21)={2,5,8,11,14,17,20}.
|
|
EXAMPLE
|
a(5)=2 since, (a) taking S={2,3} we have that 2+2=4,2+3=0,3+3=1,2*2=4,2*3=1,3*3=4 and 0,1,4 do not belong to S; (b) there is not a similar subset S with 3 elements,
so S is maximal.
|
|
MATHEMATICA
|
<< DiscreteMath`Combinatorica`; good[v_, n_]:=Block[{r=True, m=Length[v]}, Do[If[Position[v, Mod[v[[i]]+v[[j]], n]]!={}||Position[v, Mod[v[[i]]v[[j]], n]]!={}, r=False; Break[]], {i, m}, {j, i}]; r]; deSb[n_, k_]:=Block[{r={}, t=Range[n], s=Range[k], v}, v=s; While[True, If[good[v-1, n], r=v-1; Break[]]; v=NextKSubset[t, v]; If[v==s, Break[]]]; r]; Examp[n_]:= Block[{b={}, k=1, w}, While[True, w=deSb[n, k]; If[w=={}, Break[]]; b=w; k++ ]; b]; Lt={}; Ln={}; Do[t=Examp[n]; s=Length[t]; AppendTo[Ln, s]; AppendTo[Lt, {n, t}]; Print[{n, s, t}], {n, 24}]; Print[Lt]; Ln
|
|
CROSSREFS
|
Sequence in context: A029551 A132015 A120501 this_sequence A080352 A025779 A085003
Adjacent sequences: A113754 A113755 A113756 this_sequence A113758 A113759 A113760
|
|
KEYWORD
|
hard,nonn
|
|
AUTHOR
|
Giovanni Resta (g.resta(AT)iit.cnr.it), Jan 17 2006
|
|
|
Search completed in 0.002 seconds
|