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.

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

This page as a plain text file.
%I A014587 #32 Jul 09 2022 18:28:49
%S A014587 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,
%T A014587 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,
%U A014587 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
%N A014587 Nim function for Take-a-Factorial-Game (a subtraction game).
%C A014587 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
%D A014587 R. K. Guy, Unsolved Problems in Number Theory, E26.
%H A014587 Eric M. Schmidt, <a href="/A014587/b014587.txt">Table of n, a(n) for n = 0..10000</a>
%H A014587 Achim Flammenkamp, <a href="http://wwwhomes.uni-bielefeld.de/~achim/diss.ps.gz">Lange Perioden in Subtraktions-Spielen</a>, Dissertation, Dept. Math., University of Bielefeld, Germany.
%F A014587 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
%F A014587 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.
%F A014587 The first counterexample to the conjecture above is a(5050) = 4. - _Pontus von Brömssen_, Jul 09 2022
%o A014587 (Sage)
%o A014587 def A014587(max) :
%o A014587     res = []
%o A014587     fact = [1]
%o A014587     while fact[-1] <= max : fact.append(factorial(len(fact)))
%o A014587     for i in range(max+1) :
%o A014587         moves = list({res[i-f] for f in fact if f <= i})
%o A014587         moves.sort()
%o A014587         k = len(moves)
%o A014587         mex = next((j for j in range(k) if moves[j] != j), k)
%o A014587         res.append(mex)
%o A014587     return res
%o A014587 # _Eric M. Schmidt_, Jul 20 2013, corrected _Eric M. Schmidt_, Apr 24 2019
%Y A014587 Cf. A014586-A014589, A355556.
%K A014587 nonn
%O A014587 0,3
%A A014587 _Achim Flammenkamp_