Sprague-Grundy Values of Octal-Games

Introduction

These are special cases of Nim Games --- the so called Take-and-Break Games.
Given a heap of size n and two players who alternately have to make a move. On each turn a player must decrease the heapsize by a certain number and divide it possibly into several smaller heaps. The player who can't make a legal move, loses. Hence a heap of size 0 ist always lost and gets value G(0)=0. Generally a heap of size n has the value G(n) = min{ N0 \ Uj G(successor_positionj) } with j indicating all possible successor_positions.
The rule of these Take-and-Break Games is coded into a digit-string of the form d0.d1d2d3... where the i-th digit diindicates in how many non-empty heaps the chosen heap must be broken if its size was decreased by i.The digit di is interpretated as a binary-value, containing the two-power 2k if and only if the heap is allowed to be divided into k non-empty heaps. Of course d0 never contains 1 or 2. Octal-Games are a subset of these games, where both players has the same move options and are restricted at each move to dividing a heap into at most two parts, hence restricting any digit di to be atmost 1+2+4 < 8.
In the case of the range type (0) of the sparse space phenomenon, the set of these Sprague-Grundy-Values G(n) can be divided into a sparse set and its complement, called the common set. Values of the sparse set occur extremly rare, mostly only finite often. If these rare values die out then the infinte sequence of the G(n) must become periodic. A value G(n) belongs to the sparse set (in the range) if and only if population_count( G(n) AND m) AND 1 = 0 for a fixed game specific bitstring m.

On this web-page (and its sub-pages) results for all octal games of notation 0.???, 4.??? -- here a ? indicates any octal digit 0-7 -- , 0.61111...., Grundys-Game and 0.0n7 with n <= 25 -- this last notation indicates you must always reduce a heap by n tokens and 0, 1 or 2 heap(s) may remain -- are given.

A compendium containing all 2*83=1024 at most 3 place octal games to find or match its standard form.

Next a listing of all the 167 standard forms to look up basic attributes and the same listing sorted by their sgv-sequences.
In each line of this listing presents from left to right a game-name, its the period- and preperiod lengtn, its the maximum sg-value, its number of lost postions and the first 40 values of its sgv-sequence. If the sum of period and preperiod length of a game is larger than 250 it is left blank. In those 93 cases the game is called non-trivial and it is listed in the following table.

Nontrivial Octal-Games with at most 3 places

Game sgv-sequence type bitstring rare last   max n max G index lost  ultimate depth average period length preperiod except

.004 0000011112220333... 0 0001111111111... 184854 15869181 228 6279 50820532 32 827066 20121795 413498.77
.005 0001011222033411... 1 1110100011011... 126626 2009138943 231 1089 1661343568 - - 1004569471 25054.62
.006 0000111222033111... 0 0000000101111... 494760 268230298 228 6586 236938968 40 117632 127494029 660266.87
.007 0001112203311104... 0 0001110111111... 22476 5029983 233 1689 248902927 37 16170 7845114 34016.94
.014 0010010122123401... 0 0111111111111... 2037 64126 239 426 262345068862 13 342 263405 3558.18
.015 0011010212230142... 0 0111111111111... 237 11973 242 112 27283228139517 40 34014 388.09
.016 0010122201014422... 0 0010111111111... 21442 180340840 231 1104 401309452 18 1474 142375926 47117.43
.024 0001122304112532... 0 ? 226 19874 65504638 26 28624
.026 0001122304112533... 0 ? 226 58391 64018107 27 2235172
.034 0011022314014312... 0 1111111111111... 1079 374473 240 259 302490578942 10 270 1782211024 1444.81
.04 0000111220331110... 0 0001110111111... 22476 5029984 231 1689 248902928 38 16171 6176973 34019.30
.054 0010122234411163... 0 1011111111111... 38 796 - 41 33671802 3 3 16284 103.59 10015179 193235616 18
.055 0011122231114443... 0 1111111111111... 6 43 - 8 51 2 1 20 12.97 148 259 2
.06 0001122031122334... 0 ? 226 62313 66860915 37 7537483
.064 0001122334115533... 0 0111111111111... 7085 8555018387 233 536 7694369477 3 2 4277509193 8314.95
.104 0100010221224104... 1 1110111111111... 20 284 - 29 186892397 - - 4178 17.67 11770282 197769598 9
.106 0100012221440106... 1 1011011111111... 15 1103 - 31 1937780317 - - 15343 ~16.45 328226140474 465384263797 25
.114 0110011202120411... 0 1111111101111... 549882 536839512 229 1670 395200415 11 154 268020165 176905.43
.125 0102110213011302... 0 ? 226 112187 66582353 158 57108572
.126 0100213321042503... 1 0111001110001... 20444 102973539 231 2222 265978 - - 76798817 33525.34
.127 0102210441220144... 1 1000001111111... 693 27106 - 56 24734 1190 20984 13551 3.50 4 46578 11
.135 0112011203110312... 0 ? 226 70892 66479018 96 53716054
.136 0110021302110223... 0 ? 226 66923 65784069 42 17840218
.14 0100102122104144... 0 0011111111111... 1896 178727 239 102 405178406154 172 2199 2286677 2153.19
.142 0100222110332410... 1 1100011101111... 1357 117323 239 447 304983208467 - - 471721 1711.41
.143 0101222010422150... 0 1011111111111... 9417 2561883 234 148 26789789 13 81 12755153 213087.31
.146 0100222411133244... 0 1010111111111... 5817 307166 236 1636 36376171044 3 3 597458 22444.39
.156 0110222441113224... 0 1101111111111... 15 357 - 23 1032 2 3 243 25.19 349 3479 8
.16 0100122140142140... 0 0111111111111... 53 13935 - 23 229790 7 837 21577 141.08 149459 105351 16
.161 0102102132132430... 0 0111111111111... 489 23784 241 159 654608936497 14 429 119516 795.65
.162 0100223110422610... 0 ? 226 99571 65956108 63 24565333
.163 0102231042261042... 0 0001110111111... 2812332 66454439 226 47510 41896238 417 7050063 33227219 6225123.16
.164 0100122344511632... 0 0000011001111... 333838 45296885 227 20543 3402756 3 3 27693460 938706.47
.165 0102132134436231... 0 1101111111111... (17#+87) - - 25 620 2 2 - - 1550 5181 4
.166 0100223411662244... 0 1011111111111... 176 4281 241 181 18108192589123 3 15905 589.31
.167 0102234116224411... 0 1011111111111... 60 1303 243 64 332129728 2 2 9407 161.03
.172 0110223011322440... 0 1011001111111... 2352 51381 238 392 268072142017 10 3947 192643 3893.11
.174 0110213221445642... 0 1101111111111... 57 674 243 82 312784191354 2 3 13383 146.25
.204 0010120101231212... 1 0101110111111... 2245 83860 238 465 234528691963 - - 256102 3139.34
.205 0012010123123134... 1 1110010111111... 112 33944004 243 94 1140389987762- - 81239243 113.73
.206 0010123201012323... 0 0011011111111... 10339 5668113 234 869 11885172363 19 5184 9861529 10653.89
.207 0012120301245312... 1 0110100111111... 154 433920 241 128 341715359271 - - 900695 142.63
.224 0012012312314304... 0 0000001111111... 1631435 60392951 226 26371 56303768 26 198802 30032685 2714507.82
.244 0010123234515673... 0 1000111111111... 65367 7596617 229 7230 202510574 3 3 11295819 239324.50
.245 0012123451567321... 0 0101111111111... 151 1352 242 146 20308285618812 1 87579 383.98
.264 0012345163251867... 0 1001111111111... 1992 46544 238 1011 69651677642 2 1 426369 5796.45
.314 0120120212312453... 0 0000011111111... 180148 130980749 228 3589 170683843 56 2770 54578509 338165.85
.324 0102130134023421... 1 1110010111111... 126 129608 242 113 642064155864 - - 487269 135.79
.334 0120120312312435... 0 0000100101111... 3143623 67108574 226 32834 61361132 47 159618 33554286 5920248.00
.336 0120312403120341... 0 0011111111111... 223 53899 241 101 843314440005 14 630 193967 852.74
.342 0101232010323450... 0 ? 226 65557 67031742 68 636295
.344 0101232451462321... 0 0011111111111... 8679 313574 235 1404 7241270191 2 2 535382 58700.00
.346 0101232451672321... 0 ? 226 196906 67073585 2 2
.354 0120124312352435... 0 1111110111111... 132 3227 - 113 1152 2 3 1613 68.70 1180 10061916 44
.356 0120212451675128... 0 1101111111111... 7 43 - 19 86 2 3 19 11.07 142 7315 2
.36 0102102132132430... 0 0111111111111... 516 11798 241 215 104286314112 14 429 32322 816.36
.362 0102341023415237... 0 0011111111111... 529 43110 241 141 175951224651 11 227 328477885 1035.80
.364 0102132134534231... 0 1111011111111... 977 13573224 239 564 6784 2 2 129303688 1420.42
.366 0102345162345768... 0 0111111111111... 827 643528 239 548 387241007404 2 2 1724483 2510.35
.37 0120123123403421... 0 0111011111111... 1583 20626 239 386 374602320655 13 407 1353582 2748.39
.371 0123103240234012... 0 0000001110111... 1498349 48231695 226 17474 27626301 42 40891 26945025 3029184.37
.374 0120124312352435... 0 0111111111111... 246 2354 241 237 846439142280 2 3 10961 584.89
.376 0120312435243514... 0 0111111111111... 510 1140540 - 176 341612 2 3 570270 417.00 4 2268248 42
.404 0001122334115633... 0 1101101011111... 369 8024 240 265 71029986654 7 286 5434066 1068.84
.414 0011022344011322... 0 ? 226 328214 67034421 21 238588
.416 0011223411663221... 0 1010111111111... 1014 10965 239 740 459561988878 3 16 14029 2794.73
.444 0001122334115633... 0 1101111111111... 364 72416309 241 233 949328477503 3 2 451989749 655.59
.45 0011223114432211... 0 1111111111111... 11 198 - 8 37 2 1 37 12.80 20 498 8
.454 0011223411663221... 0 1011111111111... 17 124 - 41 14456117 2 1 4858 64.64 60620715 160949019 16
.56 0102241132446621... 0 1101101111111... 46 1795 - 64 22778 2 2 7405 48.45 144 326640 26
.564 0102244113254768... 0 0110011111111... 1687 13275 238 1512 39104712026 2 2 24037 7144.23
.6 0012012312340342... 0 0111011111111... 1584 20627 238 363 7775706554 14 408 1315170 2749.39
.604 0012012312345345... 0 ? 226 320005 67081314 15 7943720
.606 0012340123451234... 0 0111111111111... 112710 2147286993 231 1637 1018462325 18 732 1073643497 78666.78
.64 0012341532154268... 0 0111110111111... 488 156751 239 262 1911635806 2 1 619865797 1089.33
.644 001234516325896a... 0 0111111111111... 31 511 - 64 333 2 1 604 44.02 442 3256 32
.74 0101232414623215... 0 1101101111111... 1386 15929 239 512 76103606 2 2 395273 3760.74
.744 0101232451672321... 0 0011011111111... 876 11268 239 789 398831952222 2 2 62750 3970.95
.76 0102341623416732... 0 0000000110011... 219248 5208068 227 17313 113100740 2 2 7447283 458487.09
.764 0102345162345768... 0 0111001111111... 12078 941007 235 5465 33189838648 2 2 1963002 52443.71
.774 0123145671328954... 0 0101111111111... 352 3519 240 257 3285 1 0 124353 520.62
.776 0123416321674581... 0 1001111011111... 503 7348 240 296 5487 1 0 302101968 635.16

4.004 0010123231454323... 0 0111111111111... 8914 43090760 234 1996 20532406 3 3 33084859 23654.62
4.007 0012123454132825... 0 1111110101111... 2259 186900 238 1024 183768341213 2 1 269541 6704.09
4.026 0012345613274165... 0 1000111111111... 440236 134201783 227 16817 4081741 2 1 64302050 1701232.30
4.044 0010123234541673... 0 0011111111111... 184 1688 240 295 244301891602 3 3 21701 779.58
4.045 0012123454167828... 0 1111101111111... 34 497 243 99 44854535731752 1 5412 128.57
4.064 0012345613285764... 0 1101011111111... 52 470 - 111 19114 2 1 420 80.07 16132 94272 45
4.324 0120312435241352... 0 1110110111111... 271 5956 239 256 654707 2 3 24896 740.11
4.327 0124312435213524... 0 1111111011111... 7111 1084182 234 2247 7409767 1 0 1748492 21764.85
4.344 012021246164812a... 0 1110111111111... 14 271 - 35 190 2 3 164 20.59 51 998 4
4.364 0120312435243521... 0 0111111111111... (6#+992) - - 33 2141 2 3 - - 62 11687 14
4.367 0124312435213524... 0 0111111111111... 142 3508 242 110 595251350570 1 0 272121 230.28
4.404 0012314324523513... 0 0111101111111... 132 1852 - 208 229872163 2 1 17840 108.92 145 6872982644 71
4.406 0012345621874598... 0 1101111111111... 23 205 - 50 231573 2 1 212 63.14 44 294097 32
4.44 0012341632167458... 0 1001111011111... 504 7349 240 296 5488 2 1 302101969 636.16

.6111... 0012312341321461... 0 1011111111111... 171 2026 242 78 582019050136 2 1 32009544 221.29

Grundy's0001021021021321... 0 0111111111111... 1287 48399022 239 297 21544358589 42 1222 51335130 3129.40
Couples 0001201231234034... 0 0111011111111... 1585 20628 238 363 7775706555 15 409 1315171 2750.39

Grundy's Game: the only option is to break any heap (of size greater than 2) into two heaps of different size.
Couples-are-forever: the only option is to break any heap of size greater than 2 into two heaps. It is the shifted variant of officiers (also denoted as .6) and the two-times shifted variant of .37. Moreover in this table of nontrivial octal-games four further games are equivalent: .776 with 4.44 and .04 with 0.007. Therefore, together with Grundy's Game and 0.6111..., it contains a total of 99= 93+4+2 entries (including the 3 duplicates for history).

Listing of these 93 nontrivial Octal-Games with at most 3 places and 0.6111... and Grundy's Game sorted by

in the given examined domain.
The games 4.44, 0.04, 0.37 and Couples-are-forever are omitted in the preceeding 7 listings (look up instead 0.776, 0.007, 0.6 and 0.6).

legend:

Game
name of the game
sgv-sequence
the sequence of the G-values starting from n=0
type
kind of sparse space phenomenon: 0 = in range / 1 = in domain (sparse-position-space)
bitstring
infinite 0-1-sequence describing the sparse space with lowest significant bit first
bitmask
finite binary number describing the sparse space with lowest significant bit last, mirrored 1-complement of bitstring
rare
number of known rare values resp. size of sparse set
last
largest known index of a rare value
max n
maximum n for which all G(n-1) are computed. This equals the size of the examined domain (counted included 0).
max G
maximal known value G(n)
index
index n of known maximum G(n)
lost
number of known lost sg-values i.e. number of indices n with G(n)=0
ultimate
largest known index with a lost sg-value
depth
maximal number of necessary previous values for computing all known G-values
average
average number of necessary previous values for computing all known G-values
period
minimal period length
preperiod
minimal preperiod length
except
last exceptional sg-value in the preperiod
miss
number of values in the preperiod which are not covered by the period if this would be shifted by multiples of its length
auto
shift < period length of maximal autocorrelation of the sgv-sequence
correl
maximal autocorrelation coefficient (shift is given by auto)
t
highest index of an octal-digit which contains a heap-break option for a specific game (in our cases an integer ≤ 3)
length
length/depth (<= last+t) of the mex-shift register to simulate the game after the last rare value has occured

Support

In July 2026, Tyler Satchel Orden from Los Angelos, USA, supports this database of octal-games by extending the sgv-sequence of lots of octal-games.

Nontrivial Octal-Games with known Structur

Game period* preperiod* miss density typerare last+t max Gdepthautocorrelsolved
.45 20 498 67 0.1345 0 11 200 8 37 1 0.4 1956
.156 349 3479 1919 0.5516 0 15 360 23 243 66 0.8367 1967
.055 148 259 129 0.4980 0 6 46 8 20 28 0.8378 1976
.644 442 3256 2208 0.6781 0 31 514 64 604 207 0.7285 1976
.356 142 7315 6419 0.8775 0 7 46 19 19 26 0.9155 1976
.165 1550 5181 251 0.0484 0 (17#+87) - 25 2597 620 0.9277 1976
.127 4 46578 15622 0.3354 1 693 27109 56 13551 - 0.0000 1988-10-??
.56 144 326640 291858 0.8935 0 46 1797 64 7405 59 0.6042 1988-10-??
.16 149459 105351 3634 0.0345 0 53 13937 23 21577 3 0.9148 1988-10-??
.376 4 2268248 1104157 0.4868 0 510 1140543 176 570270 - 0.0000 1988-10-??
.454 60620715 160949019 147240872 0.9148 0 17 127 41 4858 98 0.3424 2000-12-31
.104 11770282 197769598 163669736 0.8276 1 20 287 29 4178 12 0.4993 2001-07-01
.106 328226140474 465384263797 1 15 1106 31 15343 152 0.3548 2002-05-21
.054 10015179 193235616 170776546 0.8838 0 38 799 41 16284 108 0.5809 2002-05-27
.354 1180 10061916 7912461 0.7864 0 132 3227 113 1613 193 0.7517 2012-10-??
4.064 16132 94272 88473 0.9385 0 52 473 111 420 5 0.7894 2012-10-27
4.344 51 998 643 0.6443 0 14 274 35 164 20 0.9216 2012-10-27
4.364 62 11687 1198 0.1025 0 (6#+992) - 33 4221 4 0.4839 2012-10-27
4.404 145 6872982644 66443761570.9667 0 132 1855 208 17840 3 0.8897 2012-10-29
4.406 44 294097 258904 0.8803 0 504 208 50 212 7 0.5 2012-10-27
*the length of the minimal (pre)period is given

To prove a period length p of such a game computationally, it is sufficient to verify the equation G(i+p) = G(i) only for t+ max { last, depth } many successive sg-values with t the largest index of a non-zero digit of the game's name (in the case of a sparse position space p should be even).
There are still 65 and 8 unsettled 2-place- respectively 3-place-octal games (and Grundy's Game and 0.6111...).

Remark: if there are only finitely many rare values, the game will become ultimatively periodic. For a given octal game, let a denote the number of digits which allows a take remaining still something, i.e. the number of digits containing 2, and let b denote the number of digits which allows a break in two heaps, i.e. the number of digits containing 4. Each rare value can prohibit a common value. Thus if all the, say s, rare values cover different (and the smallest) common values for all the move options, then at last the a+s*b+1 common value must be the sg-value. For a given bitstring m having the unique 1-complement representation 2n-1(2k-1)+1with n,k positive integers, there are at most 2n successive rare respectivley common values (n-1 is the number of successive lowest 0-bits in m). So we get a quantitive upper bound for the maximal occuring sg-value. Thus, the mex-rule can be considered as a shift-register of length largest rare index + t and its sum of period length and preperiod length must be bounded by (a+s*b+1)last+t.

Finally a tabular overview of the increase of the maximum as n climbs from the strongest growing 3-place octal games and a table of how fast n climbs for the next two power of all 3-place octal games.


A clickable image of maxi ≤ n G(i) of the strongest growing 3-place octal games for all n < 226.

The concept of sparse position space.

Correction

On 2020-Nov-12 Tomek Czajka from Los Angeles informed me that the game .161 has not the same standard form as .36 and their sgv-sequences differ firstly at index 520 and for infinitely many further. Thus I had overlooked this game which counts up to a total of 65 unsolved 2- and 3-place-octal games (and discovered a further flaw in WW p. 105).

Misprints in Winning Ways chapter 4

(1st and 2nd edition, german & english):

Further informations on the .00...007 games

Game bitstringrarelastmax nmax Gindexlostultimate

.0 17- - --986*-
.0 2700011101111111...22476 50299832321689 2489029273716170
.0 3700011111111111...184837 78971432235774 2925282 31827065
.0 47? > 2796000 223163908325820 291765270
.0 5701111010111111...8052 596514 2261306 55169705 2126851
.0 6700010011111111...34905 8242860223868 8110374 202900
.0 77?01111110111101...> 2422056 223112688254651 23930307
.0 8701111111111111...4196 13699174226628 55881099 21602
.0 9701111111111111...15942 786315 2251463 12051742 231943
.010701111101111111...> 615153 8386853223117777625502 254074
.011701111111011111...178988 77752022232187 2926368 24809
.012701111111111111...9144 258184 226945 34886850 269456
.013701111110111111...18418 33459253225979 26824407 275437
.014701111111011111...8954 60241502261216 27955191 285834
.015701111111001111...279460 83885612236020 8158733 296231
.0167? > 2690000 223102508044410 306628
.017701111111111111...54981 83804372232226 4384211 301223
.018701111111111111...155214 83882242232440 845568 311292
.019701111111111111...42430 46091072232876 1253051 33216131
.020700000000111011...> 946372 223111648203064 3413930
.021701111101101111...263675 83873202234104 7507947 341499
.022701111111111111...63803 21268332234096 4160051 3741646
.023701111111101011...> 721581 8388605223123597622353 3791185
.0247? > 2068425 223109518350696 371706
.025701111111111111... 148032 77728702234114 5087945 381775
Each game .0n7 has G(i)=0 for all i <= n.

|First position i for which G(i)=v

v |.027.037.047.057.067.077 .0n-17

1 | 3 4 5 6 7 8 n
2 | 6 8 10 12 14 16 2n
4 |15 20 25 30 35 40 5n
8 |55 75 95 115 135 155 20n-5
16 |154157190 230 270 310
32 |434508437 530 617 673
64 |13201521125711251309 1461
128|32175894336826914588 4905
256|9168223371177654251956017925
512|356626575831700158579199966730
1024|1093621571858689474667 -    248642
2048| -     450546325183 -     -    745402
4096| -     11927691123380 -     -    1747901
The preceeding table is an extension of the table in 'Winning Ways for Your Mathemtical Plays', chapter 4, section Extras, paragraph 'Sparse Space Spells Speed'.

References

Richard K. Guy and Cedric B. Smith, The G-values of various games, Proc. Cambr. Philo. Soc. V 52 (1959), pp. 514-526.
Elwyn R. Berlekamp, John H. Conway, and Richard K. Guy, Winning Ways -- for Your mathematical Plays (1st edition), Vol. 1, Chap. 4, Academic Press 1982.
Anil Gangoli and Thane Plambeck, A Note on Periodicity in Some Octal Games, International Journal of Game Theory V 18 (1989), pp. 311-320.
Richard K. Guy, Unsolved Problems in Combinatorial Games, pp. 475-491, in Games of No Chance, ed. R. Nowakowski, MSRI Publications Vol. 29, 1996
Elwyn R. Berlekamp, John H. Conway, and Richard K. Guy, Winning Ways -- for Your mathematical Plays (2nd edition), Vol. 1, Chap. 4, A.K. Peters, 2001.
Combinatorial Game Theory



URL created 2000-12-??
last updated 2026-09-17 11:03 UTC+2
Achim Flammenkamp