This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A257092 #26 Aug 10 2015 17:39:08 %S A257092 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 A257092 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 A257092 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 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). %C A257092 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 A257092 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 A257092 NSum(x,y) = Flip(Flip(x) XOR Flip(y)) %F A257092 Where XOR is the bitwise exclusive OR characteristic of A003987. %F A257092 Flip(n) = 0 if n == 0. %F A257092 = n+1 if n is odd. %F A257092 = n-1 if n is even. %e A257092 The square table defining the relation begins: %e A257092 0 1 2 3 4 5 6 7 8 9 ... %e A257092 1 0 4 5 2 3 8 9 6 7 ... %e A257092 2 4 0 6 1 8 3 10 5 12 ... %e A257092 3 5 6 0 8 1 2 11 4 13 ... %e A257092 4 2 1 8 0 6 5 12 3 10 ... %e A257092 5 3 8 1 6 0 4 13 2 11 ... %e A257092 6 8 3 2 5 4 0 14 1 16 ... %e A257092 7 9 10 11 12 13 14 0 16 1 ... %e A257092 8 6 5 4 3 2 1 16 0 14 ... %e A257092 9 7 12 13 10 11 16 1 14 0 ... %e A257092 . . . . . . . . . . %e A257092 Reading from the table, 1-2-4, 1-3-5 and 2-3-6 are safe positions in Take-or-Break Nim. %o A257092 (PARI) flip(x) = if (x==0, 0, if (x % 2, x+1, x-1)); %o A257092 tabl(nn) = {for (n=0, nn, for (k=0, nn, print1(flip(bitxor(flip(n), flip(k))), ", ");); print(););} \\ _Michel Marcus_, Apr 23 2015 %Y A257092 Cf. A003987. %K A257092 nonn,tabl %O A257092 0,4 %A A257092 _Patrick McKinley_, Apr 19 2015