OFFSET
1,1
COMMENTS
Consider the following game: two players make moves in turn, initially the number on the board is n. Each move consists of subtracting a prime number that is at most the number on the board. The player who cannot play loses. This sequence is the set of winner positions in this game.
Complement of A025043.
MATHEMATICA
moves[n_] := Table[n - Prime[i], {i, 1, PrimePi[n]}]
gana[n_] := gana[n] = If[n < 2, False, ! Select[moves[n], !gana[#] &] == {}];
Select[Range[155], gana[#] &]
PROG
(PARI) is(n)=if(isprime(n) || isprime(n-1), return(1)); if(n<15, return(0)); for(k=9, n-1, if(isprime(n-k) && !is(k), return(1))); 0 \\ Charles R Greathouse IV, Nov 13 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
José María Grau Ribas, Jul 19 2013
STATUS
approved