login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A014589 Nim function for Take-a-Prime (or Subtract-a-Prime) Game. 2
0, 0, 1, 1, 2, 2, 3, 3, 4, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 0, 4, 1, 5, 2, 6, 3, 4, 7, 0, 0, 1, 1, 2, 2, 3, 3, 4, 8, 5, 7, 6, 8, 9, 0, 4, 1, 5, 2, 6, 0, 4, 1, 5, 2, 6, 3, 4, 7, 5, 8, 4, 10, 5, 7, 6, 8, 4, 7, 5, 8, 6, 10, 9, 7, 4, 8, 5, 10, 6, 0, 4, 1, 5, 2, 6, 0, 4, 1, 5, 2, 6, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,5

COMMENTS

The zero positions are given by A025043. - Nathan Fox, May 21 2013

REFERENCES

R. K. Guy, Unsolved Problems in Number Theory, E26.

LINKS

Eric M. Schmidt, Table of n, a(n) for n = 0..10000

Achim Flammenkamp, Lange Perioden in Subtraktions-Spielen, Dissertation, Dept. Math., University of Bielefeld, Germany.

PROG

(Sage)

def A014589(max) :

....res = []

....for i in xrange(max+1) :

........moves = list({res[i-p] for p in prime_range(i+1)})

........moves.sort()

........k = len(moves)

........mex = next((j for j in xrange(k) if moves[j] != j), k)

........res.append(mex)

....return res

end # Eric M. Schmidt, Jul 20 2013, corrected Eric M. Schmidt, Apr 24 2019

CROSSREFS

Sequence in context: A094440 A093736 A257481 * A071456 A071505 A071508

Adjacent sequences:  A014586 A014587 A014588 * A014590 A014591 A014592

KEYWORD

nonn

AUTHOR

Achim Flammenkamp

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 16 04:26 EDT 2019. Contains 325064 sequences. (Running on oeis4.)