84

I came up with this little two player game:

The players take turns naming a positive integer. When one player says the number n, the other player can only reply in two different ways: They can either respond with n+1 or they can divide n by a prime number if the division works out (without a remainder). Who says the number 1 wins.

Example game:

A: 48 B: 24 A: 25 B: 26 A: 27 B: 9 A: 10 B: 2 A: 1

A wins.

A round of this game could be infinite, if both players always reply with n+1, but with reasonable play (both players trying to win), each round is finite: Assume that the one player just said the number n. We argue that the sequence will reach a number strictly smaller than n after at most n steps. Note that it suffices that within the next n step, one player chooses to divide by a prime at least once to immediately reach a number smaller than n. By Bertrand's Postulate, there is a prime number p with $n \leq p < 2n$. So within the first n steps of the game, either one player divides by a prime, in which case the result is strictly smaller than n, or p is reached. But if p is reached, the only reasonable play is to answer "1", since this wins the game.

Thus, the sequence will always reach 1 eventually. Since it is a finite perfect information game with no draws, there is always a winning strategy for one of the two players. The following numbers are winning numbers, i.e. the player that says one of these numbers can force a win.

1, 4, 6, 10, 14, 16, 22, 25, 27, 34, 36, 38, 40, 46, 49, 51, 56, 58, 60, 63, 65, 69, 74, 77, 82, 84, 86, 88, ...

This sequence does not seem to be on OEIS, I will suggest an entry for it soon.

I wrote a program to generate winning numbers up to 10000, an I noticed that the gaps between winning numbers are relatively small and relatively constant. Approximately one third of the numbers are winning numbers and the difference between two winning numbers is often 2, 3 or 4.

I think the set of winning numbers poses some interesing questions, so just for fun:

  • Is there an absolute bound for the gap between two consecutive winning numbers?
  • Does the density of this set converge? If so, what is the value?
  • Is there an easy way to see whether a number is winning?
  • What is the computational complexity of determining whether a given number is winning?
  • Is there a simple winning strategy that a human can remember, or is it just chaos?

I would be interested in your thoughts, and maybe you also have some answers to other interesting questions that I did not ask.

EDIT: This sequence is now on OEIS: https://oeis.org/A362416

  • 12
    What a beautiful game! There are many natural variants, such as adding 1, 2 or 3, instead of just 1, or up to n, or dividing by squares, or prime powers, etc. – Joel David Hamkins Apr 18 '23 at 12:38
  • 2
    You say it is a finite game, but I would say it is a clopen game. Finite game = finite game tree. Clopen game = all plays have finite length = game tree is well founded. As you described it initially, it is actually only an open game for each player (all wins occur at a finite stage) with infinite play being a draw, but if you insist that winning is the only legal move on primes, then it becomes clopen by your argument. – Joel David Hamkins Apr 18 '23 at 12:53
  • 5
    It might be worth investigating whether the parity of the number of prime factors (including multiplicity) of $n$ has any influence on the winning probability. The point being that for a large $n$ with many (namely typically around $\log(\log(n))$) prime factors, one of the two legal types of moves definitely changes the parity, whereas the other one would be expected to change it with probability $1/2$. – Joachim König Apr 18 '23 at 14:37
  • 5
    After calculating the gap sizes for the first few million winning numbers, it looks very much like the frequency drops off geometrically. About half the gaps are 2, a quarter are 3, an eighth are 4, etc. – I. J. Kennedy Apr 18 '23 at 15:19
  • 9
    I would at least consider the possibility that, in spite of computational evidence, density of winning numbers could be 0, simply because the increasing average number $\log(\log(n))$ of prime divisors gives increasing "power" to the second player to make his first choice (for this to make sense, it's somewhat relevant that prescribing the parity of number of prime divisors cannot already yield an almost certain win for player 1, since player 2 always has the "parity coin flip" option $n\mapsto n+1$). This effect would however kick in very slowly. – Joachim König Apr 18 '23 at 15:39
  • 3
    Can you share the computer code, or at least precisely describe the algorithm, to compute the sequence in question? – Gro-Tsen Apr 18 '23 at 15:47
  • 1
    @Gro-Tsen I believe we can do this by starting with the primes as seeds. Each prime is an $\mathcal{N}$-position (to use the Winning Ways terminology; i.e., the next player to move wins), and a position is a $\mathcal{P}$-position iff all of its options are $\mathcal{N}$-positions. So e.g. we set 2, 3, 5, 7, 11, 13 as $\mathcal{N}$; then 4 is $\mathcal{P}$ since its two legal options are $\mathcal{N}$. Work backwards along the prime gaps: 10 is $\mathcal{P}$ because all three of its options are $\mathcal{N}$; then 9 is $\mathcal{N}$ since it has 10 as an option, etc. – Steven Stadnicki Apr 18 '23 at 17:08
  • @StevenStadnicki I did some hand computations and ended up with the same algorithm. – Michael Lugo Apr 18 '23 at 18:15
  • 1
    The questions about the winning numbers are intriguing! But when you ask "Is there a simple winning strategy that a human can remember, or is it just chaos?" I'm not sure what you mean... isn't "say 1 at the first move" an easy-to-remember winning strategy? – Alessandro Della Corte Apr 18 '23 at 20:41
  • 1
    @AlessandroDellaCorte You are right, I should have made the question more clear! I mean, if my opponent just said the number n, and n is a losing number, is there an easy way to see which of my possible choices is a winning number? And I realize, this is just the same as my third question. :) – Leif Sabellek Apr 18 '23 at 21:42
  • 8
    @JoelDavidHamkins I think it makes most sense to declare each positive integer n to be its own game. Then, with the stipulation that there is only one legal move from a prime number, each n is indeed a finite game. – Timothy Chow Apr 19 '23 at 00:46
  • Sure, I agree with that. – Joel David Hamkins Apr 19 '23 at 01:42
  • 1
    @JoachimKönig If only a small fraction of numbers are winning numbers, then even if the second player has many choices for his next number, then he might not have the choice of a winning number. So I would expect some kind of equilibrium - the fraction of winning numbers cannot fall too low. – Stef Apr 19 '23 at 06:57
  • @Stef I see it the other way round: If a positive proportion $\alpha$ were winning numbers, and this proportion is not too skewed by things like the parity of number of prime divisors, then, when I'm given a "random" integer $n$ with many prime divisors $p$, returning any fixed value $n/p$ will be a ``losing" (i.e., winning for the opponent) move only with probability bounded away from $1$. But then the probability that all of them are losing will converge to $0$ (I'm assuming that win/loss probabilities for different $n/p$ are somehow independent, but that doesn't seem so far-fetched). – Joachim König Apr 19 '23 at 07:03
  • 1
    @LeifSabellek Great question! Just an idea: perhaps one could also explore a Collatz-like analogue of this game, whereby a player can respond with $3n + 1$ instead of $n+1$. The other move would be the same as the current game. Maybe there are some interesting parallels between the two player Collatz game and the original Collatz problem – Max Muller Apr 19 '23 at 08:08
  • 3
    @JoachimKönig I investigated the number of prime factors of the winning numbers. Among the winning numbers up to 10,000,000, a significant majority (~94%) have an even number of prime factors (with multiplicity). – Leif Sabellek Apr 19 '23 at 08:31
  • @LeifSabellek That's not surprising, since primes themselves have winning perentage 0%. This of course gives a tilt to the parity question for small number of prime factors. But I do believe this will even out as the number of prime factors gets larger, e.g. between numbers with 6 and 7 prime factors in this range, the gap will be much smaller - just there aren't many of those in that range at all yet. – Joachim König Apr 19 '23 at 11:12
  • 3
    @JoachimKönig I am not sure it will even out. I tested now up to 100,000,000 now, here are the results: For each number n between 0 and 24, the number of winning numbers with exactly n prime factors is given. 0: 1, 1: 0, 2: 11779416, 3: 690476, 4: 12515377, 5: 703745, 6: 4737770, 7: 353063, 8: 1231503, 9: 110894, 10: 302215, 11: 23172, 12: 72271, 13: 4902, 14: 14043, 15: 2015, 16: 2665, 17: 540, 18: 597, 19: 124, 20: 122, 21: 27, 22: 23, 23: 8, 24: 4 – Leif Sabellek Apr 19 '23 at 13:24
  • 1
    @Leif Thanks, I'm now intrigued to realize it would be consistent with my heuristic to have only one of $d_0,d_1$ to be 0, where $d_i$ denotes density of winning numbers inside integers with $k\equiv i$ mod 2 different prime factors. The "bad start" due to primes all losing should force $d_1$ down to 0. For $d_0$, anything from 0 to 2/3 is a priori an option (the upper bound being due to the fact that the "coin toss" $n\to n+1$ should give the second player a share of at least $d_0/2$). I'm beginning to see the point of the numerically observed value close to 1/3 for the total density. – Joachim König Apr 19 '23 at 16:16

2 Answers2

16

(This is not an answer, but an extensive comment and numerical simulation about Grundy values.)

I believe there is some level of confusion because there are actually two very similar games under discussion: in what I propose to call the original game, the moves from any $n>1$ are to $n+1$ and $n/p$ with $p$ a prime factor of $n$, whereas in the modified game (suggested in the comments to the question), the only move from a prime $p$ is to $1$ (in both cases, there are no move from $1$, making whoever reaches $1$ first the winner).

The original game is not well-founded, so it conceivably has drawing positions, but as proved in the original question, there are actually no such positions; the modiified game, however, is well-founded. Furthermore, the P (=second player wins) and N (=first player wins) positions for both games coincide, so we can treat them as identical insofar as studying the P/N positions go. However, this remark does not extend to the Grundy function (nim value, or whatever you might want to call it): in the modified game, the Grundy value of any prime number is $1$ by definition; in the original game, there is no reason for this to be the case.

It is not clear a priori that the Grundy value is always finite/meaningful in the original game, because it has a loopy component: while it was proved in the question that $G$ is never a draw under perfect play, I don't see an obvious reason why $G + (*n)$ might not be a draw. For explanations as to what Grundy values mean in the case of loopy game, I refer to A. Siegel, Combinatorial Game Theory (2013), definition IV.4.12 (not exactly applicable here because the game isn't finite either, but if we believe figure 4.7 in the definition it doesn't matter). The gist of the matter is that $G$ is said to have Grundy value $n$ iff $G + (*n)$ (meaning the disjunctive sum of $G$ and a single nim heap with $n$ sticks) is a second-player win (viꝫ. is a P position): so long as all options of $G$ have a finite Grundy value, it is also the case that $G$ does, and the Grundy value of $G$ is then given by the mex (=smallest excluded) of the Grundy values of the options; when this is the case, $G + (*n)$ also have a finite Grundy value, given by the nim sum as usual. Loopy games can conceivably have non-finite Grundy values (which Siegel writes $\infty(S)$ where $S$ is a set), but experimentally this does not occur for the game being discussed here. (I don't have a proof. Of course I'm talking about the original game here, because in the case of the modified game, this issue doesn't arise at all.)

The following Sage code computes the Grundy value of the position $n$ in either the original or the modified game according to the value of the variable modified_game (the computation is straightforward after noting the fact that P-positions have Grundy value 0, even in loopy games; the fact that the code terminates proves that the computed value is finite):

# Compute the Grundy function of the following game: from n>1 we can
# move to either n+1 or n/p where p is a prime factor of n (and n=1
# there are no legal moves: whoever reaches 1 first wins the game).

See <URL:

https://mathoverflow.net/questions/445015/a-little-number-theoretic-game

> for context and discussion.

Set the following to False for the original game, and True for the

variant where the only allowed move from p prime is to move to 1

(i.e., win).

modified_game = False

Warning: Be sure to clear cache_grundy if this is changed!

Return list of possible moves from n, in sorted order

def moves(n): if n==1: return [] return sorted([n+1] + [n/p for (p,_) in factor(n)])

cache_pn = {} def compute_pn(n): # Return True if the position is P or False if it is N if n in cache_pn: return cache_pn[n] if modified_game and is_prime(n): # This shouldn't change anything: cache_pn[n]=False return False for k in moves(n): if compute_pn(k): # We have a P option: the position is N cache_pn[n]=False return False # Every option is N: the position is P cache_pn[n]=True return True

cache_grundy = {} def compute_grundy(n): # Return the Grundy value of the position n if n in cache_grundy: return cache_grundy[n] if compute_pn(n): # We treat P positions as a special case to avoid looping # forever (note that even for loopy games, the Grundy value of # a second-player win is unambiguously 0). cache_grundy[n] = 0 return 0 if modified_game and is_prime(n): # In the modified game, prime numbers have Grundy value 1 by definition cache_grundy[n]=1 return 1 # Compute the set of excluded values: excl = set() for k in moves(n): excl.add(compute_grundy(k)) # Now return its mex: for v in range(len(excl)+1): if not v in excl: cache_grundy[n] = v return v raise Exception("this should not happen")

The first Grundy values for the original game, starting with 1 are: 0, 2, 1, 0, 1, 0, 2, 1, 2, 0, 1, 2, 1, 0, 2, 0, 2, 1, 2, 1, 3, 0, 1, 3, 0, 3, 0, 1, 2, 1.

The corresponding values for the modified game are as follows: 0, 1, 1, 0, 1, 0, 1, 1, 2, 0, 1, 2, 1, 0, 2, 0, 1, 3, 1, 1, 2, 0, 1, 3, 0, 2, 0, 2, 1, 3.

The first P positions for either game are: 1, 4, 6, 10, 14, 16, 22, 25, 27, 34, 36, 38, 40, 46, 49, 51, 56, 58, 60, 63, 65, 69, 74, 77, 82, 84, 86, 88, 91, 94, 96, 100, 104, 106, 111, 115, 117, 119, 121, 123, 129, 132, 134, 136, 140, 142, 144, 146, 150, 152.

The first positions having the following Grundy values in the original game are: 0: 1; 1: 3; 2: 2; 3: 21; 4: 78; 5: 5538; 6: 138600. No position up to $10^7$ has Grundy value greater than 6. Edit: the number 32110722 ($2 × 3^3 × 7 × 17 × 19 × 263$) is the first with Grundy value 7.

The corresponding values for the modified game are: 0: 1; 1: 2; 2: 9; 3: 18; 4: 364; 5: 1260; 6: 108108. No position up to $10^7$ has Grundy value greater than 6. Edit: the number 23129820 ($2^2 × 3^3 × 5 × 7 × 29 × 211$) is the first with Grundy value 7.

The tally of positions among the first $10^7$ having the following Grundy values in the original game are: 0: 3261996; 2: 2030150; 1: 3203496; 3: 1224407; 4: 258511; 5: 21142; 6: 297.

The tally of positions among the first $10^7$ having the following Grundy values in the modified game are: 0: 3261996; 1: 3390181; 2: 1978115; 3: 1105840; 4: 242523; 5: 20995; 6: 349.

(So the discrepancy between the counts found by I. J. Kennedy and Peter Taylor is explained by the fact that one was considering the original game and one was considering the modified game. I hope this clears up the confusion!)

Update (2023-04-21): Besides the Grundy value, I think it's also interesting to consider the “game duration” (I don't know the standard term for this), namely the number of moves in the game if the winning player tries to win as fast as possible while the losing player tries to lose as slowly as possible. This is defined inductively by: $$ \begin{aligned} \operatorname{duration}(G) &= 0\text{ if $G$ is terminal}\\ \operatorname{duration}(G) &= \max\{\operatorname{duration}(G')+1 : G'\text{ option of }G\}\\ &\text{ if $G$ is a P-position}\\ \operatorname{duration}(G) &= \min\{\operatorname{duration}(G')+1 : G'\text{ a P-option of }G\}\\ &\text{ if $G$ is an N-position}\\ \end{aligned} $$ and Sage code computing it is as follows (continuing the code already written above):

cache_duration = {}
def compute_duration(n):
    # Return the game duration of the position n (where the losing
    # player tries to make the game last for as long as possible
    # whereas the winning player tries to end it as soon as possible).
    if n in cache_duration: return cache_duration[n]
    if n==1:
        cache_duration[n]=0
        return 0
    if is_prime(n):
        cache_duration[n]=1
        return 1
    if compute_pn(n):
        # We are the losing player: try to delay!
        vals = [compute_duration(k)+1 for k in moves(n)]
        dur = max(vals)
        cache_duration[n] = dur
        return dur
    else:
        # We are the winning player: try to end!
        vals = [compute_duration(k)+1 for k in moves(n) if compute_pn(k)]
        dur = min(vals)
        cache_duration[n] = dur
        return dur

(clearly this is the same for the original game and for the modified game since from a prime position the player will immediately move to 1 and terminate the game). Note that the game duration thus defined is even for P-positions and odd for N-positions, so it contains the information of which player is winning.

The first duration values for the game, starting with 1 are: 0, 1, 1, 2, 1, 2, 1, 3, 3, 2, 1, 3, 1, 6, 5, 4, 1, 3, 1, 3, 3, 2, 1, 7, 6, 5, 4, 3, 1, 3, 1, 5, 7, 6, 5, 4, 1, 6, 5, 4, 1, 3, 1, 3, 3, 2, 1, 5, 4, 3.

The first positions having the following durations in the game are: 0: 1; 1: 2; 2: 4; 3: 8; 4: 16; 5: 15; 6: 14; 7: 24; 8: 74; 9: 93; 10: 142; 11: 141; 12: 140; 13: 622; 14: 745; 15: 1204; 16: 1203; 17: 1202; 18: 1935; 19: 1934; 20: 7216; 21: 7215; 22: 7214; 23: 12847; 24: 21643; 25: 33539; 26: 86611; 27: 86610; 28: 86609; 29: 281331; 30: 281330; 31: 449631; 32: 562675; 33: 562674; 34: 1221050; 35: 2517976; 36: 2517975; 37: 5845198; 38: 8439912; 39: 8439911; 40: 8439910.

The tally of positions among the first $10^7$ having the following durations in the game are: 0: 1; 1: 664579; 2: 30657; 3: 629716; 4: 206897; 5: 1205915; 6: 378438; 7: 1318956; 8: 680231; 9: 1200304; 10: 779015; 11: 818601; 12: 572977; 13: 467615; 14: 324556; 15: 237032; 16: 161209; 17: 110655; 18: 73592; 19: 49266; 20: 32225; 21: 20968; 22: 13227; 23: 8755; 24: 5537; 25: 3515; 26: 2192; 27: 1420; 28: 825; 29: 476; 30: 285; 31: 153; 32: 91; 33: 51; 34: 30; 35: 22; 36: 9; 37: 3; 38: 1; 39: 1; 40: 1.

For example, here's how the game unfolds starting from 8439910 (in 40 moves):

A: 8439911; B: 8439912; A: 8439913; B: 8439914; A: 4219957; B: 4219958; A: 4219959; B: 1406653; A: 1406654; B: 1406655; A: 281331; B: 93777; A: 93778; B: 93779; A: 93780; B: 93781; A: 93782; B: 7214; A: 7215; B: 7216; A: 7217; B: 7218; A: 3609; B: 1203; A: 1204; B: 1205; A: 1206; B: 603; A: 201; B: 202; A: 203; B: 204; A: 205; B: 206; A: 207; B: 69; A: 70; B: 10; A: 11; B: 1 (wins)

Gro-Tsen
  • 29,944
  • 4
  • 80
  • 335
15

Edit: I added code to compute the Nim values for the first $N$ positions of this game after the original post, as requested by @Timothy-Chow. Unfortunately my results don't match those given by @Peter-Taylor in the comments, so maybe I've not computed correctly.

Old: Here is the code for the calculations I alluded to in the comments, followed by the results when examining $n$ up to 10,000,000, of which 3,261,995 are winning numbers. As you can see, the gap $g$ occurs about $\frac{1}{2^{g-1}}$ of the time.

from sympy import primefactors
from collections import Counter
from functools import lru_cache

N = 10_000_000

@lru_cache(maxsize=N) def iswinner(n): if n == 1: return True moves = [n // p for p in primefactors(n)] + [n+1] return all(not iswinner(move) for move in moves)

yields the gaps in a sequence with more than 1 element

def gaps(seq): old = next(seq) for new in seq: yield new - old old = new

def winners(): for n in range(1,N): if iswinner(n): yield n

freqs = Counter(gaps(winners()))

for gap in sorted(freqs.keys()): print(f'{gap:5}:{freqs[gap]:10}')

2:   1570812
3:    801091
4:    446401
5:    219317
6:    111298
7:     55754
8:     29343
9:     13833

10: 7112 11: 3482 12: 1831 13: 810 14: 454 15: 229 16: 111 17: 54 18: 29 19: 19 20: 8 21: 4 22: 1 23: 2

Edit 19 April 2023 (Nimbers): Even though we've been calling the numbers 1, 4, 6, 10, 14, ... winning numbers, they are actually losing positions for whichever player is facing them. So the so-called winning numbers have Nim value 0. (i.e. $\star 0$ for those versed in combinatorial game notation) The Nim value, also known as the Grundy value, is the minimum non-negative integer that is not equal to the Nim value of any of its reachable positions. This "minimum excluded" function was called mex by John Horton Conway.

The previously termed "winning numbers" have the value 0. These were computed using dynamic programming, a technique that usually only looks backwards in the array, but in this case, since $n+1$ is an allowable move from $n$, it has to look forward. The infinite game tree problem was avoiding by realizing that we'll eventually hit a prime, and a prime is a winning position (we divide by p and leave our opponent with the losing position 1). However, when computing non-zero positions as Nim values, we can't assume a player moves from a prime $p$ to 1, because it may be advantageous to not immediately move to *0 in a sum of games.

This algorithm works by finding the next zero position, and then backfilling the values to the previous zero position. For example, suppose we've computed the nimbers so far, and the we've just discovered 10 is a zero value position.

enter image description here

We can now compute the Nim value for 9, because the only moves are to 3 and to 10, and we know nimbers[3] is 1 and nimbers[10] is 0. Thus by the minimum-excluded principle the Nim value of 9 is 2. After that we can compute the values for 8 and 7.

The output of this program, which tallies all the Nim values, is

0: 3,261,996
1: 3,203,496
2: 2,030,151
3: 1,224,407
4:   258,511
5:    21,142
6:       297

Unfortunately, this does not match the values given in the comments, so it may be wrong. Please feel free to let me know!

from sympy import primefactors
from collections import Counter
from functools import lru_cache
from itertools import count

N = 10_000_000

@lru_cache(maxsize=N) def iswinner(n): if n == 1: return True moves = [n // p for p in primefactors(n)] + [n+1] return all(not iswinner(move) for move in moves)

return first non-negative integer not in l

def mex(l): for x in count(): if x not in l: return x

extra = 30 nimbers = [None]*(N+extra) nimbers[1] = 0 last = 1 n = 2

while last < N: if iswinner(n): nimbers[n] = 0 k = n - 1 while nimbers[k] is None: moves = [k // p for p in primefactors(k)] + [k+1] nimbers[k] = mex([nimbers[move] for move in moves]) k -= 1 last = n n += 1

freqs = Counter(nimbers[1:N+1])

for key in sorted(freqs.keys()): print(f'{key:5}:{freqs[key]:10,}')

  • 3
    In the first ten consecutive blocks of one million integers, the number of winning numbers is 327483, 325969, 326438, 326090, 326242, 326203, 325602, 325987, 325875, 326107. If the frequency of winning numbers drops off it does so very slowly, although per Joachim König's comments this could be tied to the very slow growth of the number of prime divisors. – Michael Lugo Apr 18 '23 at 18:09
  • 3
    The $\frac1{2^{g-1}}$ phenomenon is consistent with the winning positions being distributed at random other than not having two of them next to each other. So this suggests to me that there's no simple formula: the numbers are just acting like they're flipping coins. – Greg Martin Apr 18 '23 at 21:12
  • The argument by the OP shows that any game is decided in finitely many moves, that is any number is either winning or losing. Is there any “easy” reason for which winning numbers should be much fewer than losing ones? (Let alone having density 0…) – Alessandro Della Corte Apr 18 '23 at 21:54
  • 3
    Each number n has an associated nimber. Can you easily adapt your code to compute these nimbers? That would give more information than just whether n is winning or losing. – Timothy Chow Apr 19 '23 at 00:51
  • @AlessandroDellaCorte Not a strict argument, but an indication: The number of possible replys to the number n is (1 + number of primes that divide n). Since larger number will be divisible by more primes, there will on average be more possible replys for large n. But n is only winning if all possible replies are losing. So the "chance" that n is winning becomes smaller for larger n. EDIT: Joachim König answered the same thing, just a little more formal, in a comment to the original question. – Leif Sabellek Apr 19 '23 at 07:15
  • 4
    @TimothyChow, nimber frequencies in the first $10^7$ values of $n$: 0: 3261996, 1: 3390181, 2: 1978115, 3: 1105841, 4: 242523, 5: 20995, 6: 349. – Peter Taylor Apr 19 '23 at 08:27
  • @GregMartin but not quite - the coin flipping process you describe would lead to an average gap of exactly 3. – Michael Lugo Apr 19 '23 at 14:19
  • Even though it was proved by OP that the game always terminates in finite time if at least one player tries to win, it still has a loopy part, so I'm a bit worried about nim values: for me, the game $G$ has nim value $n$ iff $G+(n)$ is a second-player win (where $n$ is a single nim row of $n$ sticks), but it can conceivably happen that the game $G+(n)$ is a draw: computation with loopy nim values is more complicated than just taking a mex, see Siegel, Combinatorial Game Theory* (2013), definition IV.4.12. ❧ Is there an argument I missed to explain that this subtlety can't happen here? – Gro-Tsen Apr 20 '23 at 13:13
  • @Gro-Tsen I think at this point the folks looking at it are primarily working with the 'modified' version in which a player has to win if they can — i.e., the only legal move from a prime is the (winning) one to 1; this is much more amenable to analysis for exactly these sorts of reasons. – Steven Stadnicki Apr 20 '23 at 17:19
  • @StevenStadnicki Actually it appears Peter Taylor was talking about the “modified” game whereas I. J. Kennedy's computations are for the original game. I hope the comment-in-form-of-answer I just posted clears up this confusion. – Gro-Tsen Apr 20 '23 at 19:06