cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A014589 Nim function for Take-a-Prime (or Subtract-a-Prime) Game.

Original entry on oeis.org

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
Offset: 0

Views

Author

Keywords

Comments

The zero positions are given by A025043. - Nathan Fox, May 21 2013
Concerning the January 1997 dissertation of Achim Flammenkamp, his home page (currently http://wwwhomes.uni-bielefeld.de/cgi-bin/cgiwrap/achim/index.cgi) has the link shown below, and a comment that a book was published in July 1997 by Hans-Jacobs-Verlag, Lage, Germany with the title Lange Perioden in Subtraktions-Spielen (ISBN 3-932136-10-1). This is an enlarged study (more than 200 pages) of his dissertation. - N. J. A. Sloane, Jul 25 2019
As noted by Alexis Huet, a(n) <= 11 for all n <= 32452842 (see links). - Pontus von Brömssen, Jul 09 2022
From Bert Dobbelaere, Apr 09 2024: (Start)
For n <= 10^9, a(n) <= 11.
For even n <= 10^9, if a(n)=0, n is in {0, 10, 34, 100, 310}.
For even n <= 10^9, if a(n)=1, n is in {2, 12, 36, 102, 312}.
For even n <= 10^9, if a(n)=2, n is in {4, 14, 38, 104, 314, 1574}.
For even n <= 10^9, if a(n)=3, n is in {6, 16, 40, 106, 316, 1576, 1996, 5566}.
The only odd n <= 10^9 for which a(n)=4 is 17.
The only odd n <= 10^9 for which a(n)=5 is 19.
The only odd n <= 10^9 for which a(n)=6 is 21.
The only even n <= 10^9 for which a(n)=7 is 24.
There are no even n <= 10^9 for which a(n)=8 or a(n)=10.
There are no odd n <= 10^9 for which a(n)=11. (End)

References

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

Crossrefs

Programs

  • Sage
    def A014589_list(max) :
        res = []
        for i in range(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 range(k) if moves[j] != j), k)
            res.append(mex)
        return res
    print(A014589_list(50))
    # Eric M. Schmidt, Jul 20 2013, corrected Eric M. Schmidt, Apr 24 2019

A297963 The smallest position with nim-value n in subtract-a-square game.

Original entry on oeis.org

0, 1, 4, 25, 28, 29, 75, 103, 200, 234, 315, 364, 479, 633, 802, 1054, 1173, 1311, 1894, 2058, 2173, 2419, 3244, 3648, 4249, 4474, 4982, 5943, 6133, 6809, 7429, 8590, 8654, 9419, 10284, 11728, 12152, 13884, 15493, 16623, 17312, 18389, 19745, 20528, 22111, 23472
Offset: 0

Views

Author

David Eppstein, Jan 09 2018

Keywords

Comments

a(n) is the position of the first copy of n in A014586.

Examples

			The sequence of nim-values for subtract-a-square (A014586) begins 0,1,0,1,2; the first position with value 2 is position 4 (starting from 0) so a(2)=4.
		

Crossrefs

Cf. A014586.

A014587 Nim function for Take-a-Factorial-Game (a subtraction game).

Original entry on oeis.org

0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2
Offset: 0

Views

Author

Keywords

Comments

Concerning the January 1997 dissertation of Achim Flammenkamp, his home page (currently http://wwwhomes.uni-bielefeld.de/cgi-bin/cgiwrap/achim/index.cgi) has the link shown below, and a comment that a book was published in July 1997 by Hans-Jacobs-Verlag, Lage, Germany with the title Lange Perioden in Subtraktions-Spielen (ISBN 3-932136-10-1). This is an enlarged study (more than 200 pages) of his dissertation. - N. J. A. Sloane, Jul 25 2019

References

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

Crossrefs

Programs

  • Sage
    def A014587(max) :
        res = []
        fact = [1]
        while fact[-1] <= max : fact.append(factorial(len(fact)))
        for i in range(max+1) :
            moves = list({res[i-f] for f in fact if f <= i})
            moves.sort()
            k = len(moves)
            mex = next((j for j in range(k) if moves[j] != j), k)
            res.append(mex)
        return res
    # Eric M. Schmidt, Jul 20 2013, corrected Eric M. Schmidt, Apr 24 2019

Formula

Conjecture: Appears to be periodic with period of length 25 = [0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3] starting with the initial term (there is no preamble). - Michel Dekking, Jul 26 2019
This conjecture is false, because moving from 10! = 3628800 to 0 is a legal move, and so a(3628800) cannot be zero. A similar argument shows that for no value of P is this sequence periodic with period P starting at term 0 (for a(P!) cannot be zero). - Nathan Fox, Jul 28 2019.
The first counterexample to the conjecture above is a(5050) = 4. - Pontus von Brömssen, Jul 09 2022

A014588 Nim function for Take-a-Fibonacci-Game (a subtraction game).

Original entry on oeis.org

0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 0, 1, 2
Offset: 0

Views

Author

Keywords

Comments

This game is also called Fibonacci nim, but there is also a different game with the same name. Its winning positions (the indexes of zeros in this sequence) are A001581 and its (much sparser) odd winning positions are A120904. - David Eppstein, Jun 14 2018
Concerning the January 1997 dissertation of Achim Flammenkamp, his home page (currently http://wwwhomes.uni-bielefeld.de/cgi-bin/cgiwrap/achim/index.cgi) has the link shown below, and a comment that a book was published in July 1997 by Hans-Jacobs-Verlag, Lage, Germany with the title Lange Perioden in Subtraktions-Spielen (ISBN 3-932136-10-1). This is an enlarged study (more than 200 pages) of his dissertation. - N. J. A. Sloane, Jul 25 2019

References

  • R. K. Guy, Unsolved Problems in Number Theory, E26.
  • David L. Silverman, Your Move, McGraw Hill, 1971, page 211. Reprinted by Dover Books, 1991 (mentions this game).

Crossrefs

Programs

  • Sage
    def A014588(max) :
        res = []
        for i in range(max+1) :
            moves = list({res[i-f] for f in fibonacci_xrange(1,i+1)})
            moves.sort()
            k = len(moves)
            mex = next((j for j in range(k) if moves[j] != j), k)
            res.append(mex)
        return res
    # Eric M. Schmidt, Jul 20 2013, corrected Eric M. Schmidt, Apr 24 2019
Showing 1-4 of 4 results.