login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257092 Square array read by antidiagonals: Nimsum function for "Take-or-Break" Nim where a legal move is defined as: 1) Remove a nonzero number of counters from any pile up to the size of the selected pile OR 2) Split any pile of size greater than one into two nonzero piles (removing no counters from the board). 0

%I #26 Aug 10 2015 17:39:08

%S 0,1,1,2,0,2,3,4,4,3,4,5,0,5,4,5,2,6,6,2,5,6,3,1,0,1,3,6,7,8,8,8,8,8,

%T 8,7,8,9,3,1,0,1,3,9,8,9,6,10,2,6,6,2,10,6,9,10,7,5,11,5,0,5,11,5,7,

%U 10,11,12,12,4,12,4,4,12,4,12,12,11,12,13,7,13,3,13,0,13,3,13,7,13,12,13,10,14,14,10,2,14,14,2,10,14,14,10,13,14,11,9,7,9,11,1,0,1,11,9,7,9,11,14

%N Square array read by antidiagonals: Nimsum function for "Take-or-Break" Nim where a legal move is defined as: 1) Remove a nonzero number of counters from any pile up to the size of the selected pile OR 2) Split any pile of size greater than one into two nonzero piles (removing no counters from the board).

%C Observe that many "safe" three-pile positions in Nim (1-2-3, 1-4-5, 2-4-6, etc.) consist of one pile whose size is the sum of the sizes of the other two. The "Break" move is designed to trivially defeat these positions by breaking the large pile into copies of the other two. This leaves a clear winning position where every pile has a "twin".

%C Like the standard Nimsum function defined in A003987, this relation constitutes an Abelian group over nonnegative integers where every element is its own inverse.

%F NSum(x,y) = Flip(Flip(x) XOR Flip(y))

%F Where XOR is the bitwise exclusive OR characteristic of A003987.

%F Flip(n) = 0 if n == 0.

%F = n+1 if n is odd.

%F = n-1 if n is even.

%e The square table defining the relation begins:

%e 0 1 2 3 4 5 6 7 8 9 ...

%e 1 0 4 5 2 3 8 9 6 7 ...

%e 2 4 0 6 1 8 3 10 5 12 ...

%e 3 5 6 0 8 1 2 11 4 13 ...

%e 4 2 1 8 0 6 5 12 3 10 ...

%e 5 3 8 1 6 0 4 13 2 11 ...

%e 6 8 3 2 5 4 0 14 1 16 ...

%e 7 9 10 11 12 13 14 0 16 1 ...

%e 8 6 5 4 3 2 1 16 0 14 ...

%e 9 7 12 13 10 11 16 1 14 0 ...

%e . . . . . . . . . .

%e Reading from the table, 1-2-4, 1-3-5 and 2-3-6 are safe positions in Take-or-Break Nim.

%o (PARI) flip(x) = if (x==0, 0, if (x % 2, x+1, x-1));

%o tabl(nn) = {for (n=0, nn, for (k=0, nn, print1(flip(bitxor(flip(n), flip(k))), ", ");); print(););} \\ _Michel Marcus_, Apr 23 2015

%Y Cf. A003987.

%K nonn,tabl

%O 0,4

%A _Patrick McKinley_, Apr 19 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)