OFFSET
1,1
COMMENTS
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
MATHEMATICA
{a, f} = {{1}, {0}}; Do[tmp = {#, # - Last[a]} &[Min[Complement[#, Intersection[a, #]]&[Last[a] + Complement[#, Intersection[f, #]] &[Range[2 - Last[a], -1]]]]];
If[! IntegerQ[tmp[[1]]], tmp = {Last[a] + #, #} &[NestWhile[# + 1 &, 1, ! (! MemberQ[f, #] && ! MemberQ[a, Last[a] - #]) &]]];
AppendTo[a, tmp[[1]]]; AppendTo[f, tmp[[2]]], {500}];
-1 + Flatten[Position[Sign[f], 1]] (* A258049 *)
-1 + Flatten[Position[Sign[f], -1]] (* A258050 *) (* Peter J. C. Moses, May 14 2015 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 05 2015
STATUS
approved