login
A241718
The number of P-positions in the game of Nim with up to 4 piles, allowing for piles of zero, such that the number of objects in the largest pile is n.
5
1, 7, 13, 43, 25, 79, 133, 211, 49, 151, 253, 379, 457, 607, 757, 931, 97, 295, 493, 715, 889, 1135, 1381, 1651, 1681, 1975, 2269, 2587, 2857, 3199, 3541, 3907, 193, 583, 973, 1387, 1753, 2191, 2629, 3091, 3313, 3799, 4285, 4795, 5257, 5791, 6325
OFFSET
0,2
COMMENTS
This is the first difference of A241522.
LINKS
T. Khovanova and J. Xiong, Nim Fractals, arXiv:1405.594291 [math.CO], 2014, p. 8 and J. Int. Seq. 17 (2014) # 14.7.8.
FORMULA
If b = floor(log_2(n)) is the number of digits in the binary representation of n and c = n + 1 - 2^b, then a(n) = (12*c-6)*2^b + a(c-1).
EXAMPLE
If the largest pile is 2, then there are 6 positions that are permutations of (0,0,2,2) plus 6 positions that are permutations of (1,1,2,2) and one position (2,2,2,2). Therefore, a(2)=13.
MATHEMATICA
Table[Length[Select[Flatten[Table[{n, k, j, BitXor[n, k, j]}, {n, 0, a}, {k, 0, a}, {j, 0, a}], 2], Max[#] == a &]], {a, 0, 50}]
CROSSREFS
Cf. A241522, A241717 (3 piles), A241731 (5 piles).
Sequence in context: A134854 A330671 A097444 * A259184 A259186 A151781
KEYWORD
nonn
AUTHOR
Tanya Khovanova and Joshua Xiong, Apr 27 2014
STATUS
approved