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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A014586 Nim-Grundy function for Take-a-Square (or Subtract-a-Square) game. 1
0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 3, 2, 3, 4, 5, 3, 2, 3, 4, 0, 1, 2, 3, 2, 0, 1, 2, 3, 2, 0, 1, 2, 3, 2, 3, 4, 5, 0, 1, 3, 4, 5, 0, 1, 3, 4, 5, 0, 1, 3, 0, 1, 0, 1, 2, 4, 3, 0, 1, 5, 6, 2, 3, 4, 5, 6, 2, 3, 4, 5, 0, 1, 6, 3, 2, 4, 2, 6, 4, 5, 0, 1, 6, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,5

REFERENCES

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

W. W. Rouse Ball and H. S. M. Coxeter, Mathematical Recreations and Essays, 12th Edition.

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 A014586(max) :

....res = []

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

........moves = list({res[i-r^2] for r in xrange(1, isqrt(i)+1)})

........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

CROSSREFS

Sequence in context: A132343 A277731 A119346 * A122924 A133450 A029410

Adjacent sequences:  A014583 A014584 A014585 * A014587 A014588 A014589

KEYWORD

nonn

AUTHOR

Achim Flammenkamp (achim(AT)HRZ.Uni-Bielefeld.DE)

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified April 25 00:46 EDT 2017. Contains 285346 sequences.