R02 Research
Every Other Odd Number
A model was told to make a discovery and left alone. The game it chose, and what it found there.
Shortly after five in the morning on 2 December I gave Claude Fable 5.2 one instruction. Make a real, new scientific discovery; choose the field, the question, the data and the method yourself. It counts if nobody has described it, if the hypothesis and its test are committed to git before the test data is seen, if one command reproduces every number, and if you say what result would refute it. Forty dollars for anything that costs money. No questions.
It spent nothing. In its first half hour it dropped four topics: two had been described already, one needed weeks of computing, one turned up nothing but trivia. Then it settled on a game.
The game
A pile of tokens. Two players take turns removing a prime number of them: 2, 3, 5, 7, 11 and so on. Whoever cannot move loses, so a pile of 0 or 1 is lost for whoever has to move. You go first.
34
From most piles the first player can force a win. From some they cannot, because every move hands the other player a pile that wins. These losing piles are listed in the OEIS as A025043: 0, 1, 9, 10, 25, 34, 35, 49 and on. Almost all of them are odd. Up to 109 there are only five even ones, 0, 10, 34, 100 and 310. Whether a sixth exists is open. Achim Flammenkamp asked in a footnote to his dissertation in 1997, and in 2017 Peter Munn conjectured that there are only finitely many. Fable checked every even pile up to 1013. Still five.
Walls
It started from a sentence anyone could have written. An odd pile loses when every move leads to a pile that wins. Taking 2 leads to the odd pile two below. Taking any other prime, which is odd, leads to an even pile, and an even pile loses only if it is one of the five. So if the five are all there are, an odd pile a loses exactly when a − 2 wins and none of a, a − 10, a − 34, a − 100 and a − 310 is prime.
Call an odd number a wall when one of those five is prime. A wall always wins: take that prime and leave one of the five. Right after a wall the next odd pile loses, the one after it wins, the one after that loses, and so on until the next wall starts the count again. Between two walls, every other odd number loses.
Odd piles only. Red: walls. Black: losing piles. Grey: the rest.
The rule gives an exact count. Between two walls d apart lie ⌊d/4⌋ losing piles, so below any x divisible by 4 there are x/4 + 5 of them, minus half the number of wall gaps that leave 2 when divided by 4, rounded down. The quarter is a ceiling for any set like this: among t, t + 2, t + 5 and t + 7 every two differ by a prime, so at most one in four can lose.
Fable checked the count without the game. A second program that knows nothing about piles, which only sieves primes and measures the gaps between walls, puts the losing piles below 1013 at 2,058,164,026,826. The program that plays the game counted the same number, to the last pile.
A quarter, slowly
Those who looked at these numbers before saw shares that seemed to settle. Alexis Huet charted the share of every value in 2014, and they seemed to tend to constants. A comment under a MathOverflow question in 2015 guessed that the losing piles would thin out to nothing. A commenter on Math Stack Exchange that year said they would reach a quarter, if the five are all. They do reach a quarter, but at the pace of 1/ln x, which over any range a computer can reach looks like standing still. Even the pace takes its time. The share falls short of a quarter by about c/ln x, and in the model c creeps from 1.16 at 107 to 1.27 at 1012, and comes near its limit of 7/4 only past 101000.
Fable then did the careful thing. It replaced the primes with their standard random model: numbers that survive a sieve by the primes up to 401 are declared prime at random, at the rate that makes their density 1/ln x. Nothing in it was fitted to the game. From the model it predicted the number of losing piles in every decade up to 1012, and in one more as an extra. At 06:06:22 it committed the predictions, the code that would score them and the thresholds. Seven seconds later it started counting. Do the same: below is what it had seen. Set your guess for the last decade, commit, then look.
The threshold written down in advance was 0.10 percent. The worst miss in six decades was 0.0074 percent; in the last one, counted after the main test, 0.0050. Fable notes that it set the threshold after seeing a training error of 0.026 percent, so the bar was loose; the model would also have passed at a tenth of it. Run again afterwards on a sample 64 times larger, the model misses by about a thousandth of a percent. What is left looks like a small bias whose source Fable did not find.
Eleven
Every pile also has a nim value, a number that says how it plays when several piles are on the table at once. Losing piles have value 0. In every table computed so far, up to 109, no value goes above 11, and nobody had said why. Fable wrote a rule for all the values, which holds as long as a list of 28 exceptional piles is complete, and checked it to 109. Under that rule an even pile m could reach 12 only if m − 21, m − 19 and m − 17 were all prime. They are three consecutive odd numbers, and of any three consecutive odd numbers one is divisible by 3. For m = 482 they are 461, 463, 465, and 465 = 3 × 155. The only three that are all prime are 3, 5 and 7, which gives m = 24, and 24 has the value 7.
The same rule says where the values end up. 0, 1, 4 and 5 each tend to a quarter of all piles, the other eight to nothing. At 109 their shares are still 18.9, 18.9, 23.6 and 23.6 percent, which is why the charts looked settled at the wrong numbers.
Check it here
Everything above about walls assumes there is no sixth even losing pile. Below 100,000 nothing has to be assumed. Your browser can compute every pile from the definition, find the even losing ones and test the rule on every odd pile.
- Piles computed
- –
- Even losing piles
- –
- Largest nim value
- –
- Odd piles where the rule is wrong
- –
- Time on this device
- –
What is not known
Nothing here is proved. The rule for losing piles holds wherever there is no sixth even one, and there is none below 1013. An even pile wins when some prime takes it to a losing pile. Above 107 a prime no bigger than 313 always does; the hardest even pile of all is 3,610, which needs 1,091. A sixth would be a pile where every prime fails at once. That makes it very unlikely and proves nothing. The rule for all values needs the list of 28 to be complete. That is a statement of the same kind as Goldbach’s, and Fable writes that it sees no way to prove it.
Not all of it is new. In 2012 Hagen von Eitzen wrote on Math Stack Exchange that an odd pile loses only if the pile two below wins and no odd prime takes it to an even losing pile, and then set the first half aside to estimate the rest. In 2015 a commenter there had the condition that a, a − 10, a − 34, a − 100 and a − 310 be composite, and the quarter itself, on the condition that the five are all. Fable found them about an hour into the run and credits them. What it claims as new is the every-other rule and the exact counts that follow from it, the rule for all values with the reason for 11, where the shares end up, the model and its test, and the counts up to 1013. It searched two search engines in English, German and Russian, the OEIS, Stack Exchange and arXiv, and asked no one. It drafted comments for the OEIS and did not send them.
From its first commit to a draft of the result took 78 minutes. Then it spent almost four more hours checking itself. It counted the decade to 1013 and counted it again with the wall program, reran its one command in a fresh copy of the folder (52 minutes, every number the same), and corrected its own attributions. Its last commit is at 10:02. The whole run to 1013 has never been done from scratch in one go; Fable puts it at about fifteen hours of processor time.
Our own evaluation has not happened yet: a rerun of its command on our side, an independent search for earlier work, a check of its timestamps against the logs, and my grade from one to five, given before I read its reasons. This note will change when they are done.
Sources: OEIS A025043 and A014589; A. Flammenkamp, dissertation (1997), p. 78, note 33; Math Stack Exchange 226230 (2012); A. Huet, Nim take-a-prime (2014); Math Stack Exchange 1377898 (2015); MathOverflow 222250 (2015).