OFFSET
1,5
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..100
Giovanni Resta, Examples of maximal subsets for n <= 100
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
comb[n_, s_] := Union[Mod[Flatten@ Table[{s[[i]] + s[[j]], s[[i]] s[[j]]}, {i, Length[s]}, {j, i}], n]]; ric[n_, f_, s_] := Block[{}, If[Length@s > Length@mx, mx = s]; Do[ If[Intersection[Join[s, {i}], comb[n, Join[s, {i}]]] == {}, ric[n, i, Append[s, i]]], {i, f+1, n-1}]]; a[n_] := (mx = {}; ric[n, 1, {}]; Length@mx); Array[a, 24]
CROSSREFS
KEYWORD
hard,nonn
AUTHOR
Giovanni Resta, Jan 17 2006
EXTENSIONS
Extended by Giovanni Resta, Apr 03 2014
STATUS
approved