Nimbers of the game Couples-are-Forever up to 200 million

Data and analyses by Rudini Sampaio, Universidade Federal do CearĂ¡. Data licensed under CC BY 4.0; code under the MIT license.

Files

CF.txt.xz All nimbers CF(1), …, CF(200,000,000): one value per line, compressed with xz (line n holds CF(n)).
README.md Description of the data, the observed results and the computation.
stat_CF_values.csv Statistics of the values: for each value, its count, frequency, first and last position, and whether it satisfies the support rule below.
gap_summary_CF.txt Gaps between consecutive occurrences of the same value.
lag_spectrum_CF_K20000.csv Lag spectrum: probability that CF(i+k) = CF(i), for 1 ≤ k ≤ 20000.

The game and the sequence

Couples-are-Forever is a two-player impartial combinatorial game under normal play (the player who cannot move loses). A position of size n can be split into two smaller positions of sizes i and n−i, with 1 ≤ i ≤ n/2, except that positions of size 1 and 2 are terminal: a “couple” is forever and cannot be separated. The two parts are then played as a disjunctive sum.

By the Sprague–Grundy theorem, the game on a position of size n is equivalent to a Nim heap whose size is its nimber (Grundy value) CF(n). These nimbers satisfy

CF(1) = CF(2) = 0,
CF(n) = mex { CF(i) ⊕ CF(n−i) : 1 ≤ i ≤ ⌊n/2⌋ }   for n ≥ 3,

where ⊕ is the bitwise exclusive or and mex is the least non-negative integer that does not belong to the set. The first values are CF(1), CF(2), … = 0, 0, 1, 2, 0, 1, 2, 3, 1, 2, 3, 4, 0, … The data contain CF(n) for 1 ≤ n ≤ 200,000,000. The largest value in this range is 325.

What we observe

Proved, not just observed. Since CF(m) is a mex, it is different from CF(a) ⊕ CF(m−a) for every 1 ≤ a ≤ ⌊m/2⌋. In particular, if CF(a) = 0 then CF(m) ≠ CF(m−a) for all m ≥ 2a. The other observations above refer to the computed range only.

Statistics

Distribution of the values CF(i)
Frequency of each value of CF, in linear scale (top) and logarithmic scale (bottom). Blue: values that satisfy the support rule. Orange: values outside the rule, which occur only for n ≤ 20,628.
Most frequent gaps between equal values
Gaps between consecutive occurrences of the same value: for each gap, the average percentage over the 145 values with at least 2000 occurrences.
Lag spectrum of CF
Lag spectrum P(k) = Pr[CF(i+k) = CF(i)] (dashed line: 1.158%, the value for independent values). (a) Lags 1 to 2000. (b) Lags 1 to 130; the triangles mark the multiples of T = 22.415 and the crosses the lags with probability 0. (c) Maximum of P over windows of 50 lags, up to lag 20000.

Computation

The sequence was computed on the ParGO cluster of the Federal University of CearĂ¡, on an instance with an AMD Ryzen 7 5700G processor (16 threads) and 55 GB of RAM, in about 15 days. See the read me file for details.