login
The number of P-positions in the game of Nim with up to 5 piles, allowing for piles of zero, such that the number of objects in the largest pile is n.
5

%I #21 Feb 28 2018 15:04:34

%S 1,15,45,195,165,555,1125,1995,645,1995,3525,5355,7605,10395,13845,

%T 18075,2565,7755,13125,18795,24885,31515,38805,46875,55845,65835,

%U 76965,89355,103125,118395,135285,153915,10245,30795,51525,72555,94005,115995

%N The number of P-positions in the game of Nim with up to 5 piles, allowing for piles of zero, such that the number of objects in the largest pile is n.

%C This is the finite difference of A241523.

%H T. Khovanova and J. Xiong, <a href="http://arxiv.org/abs/1405.5942">Nim Fractals</a>, arXiv:1405.594291 [math.CO] (2014), p. 9 and <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Khovanova/khova6.html">J. Int. Seq. 17 (2014) # 14.7.8</a>.

%F 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)= 10*2^(2*b)*(2*c-1) + 20*c^3 - 30*c^2 + 20*c - 5.

%e If the largest pile is 1, then there are 10 positions that are permutations of (0,0,0,1,1) plus 5 positions that are permutations of (0,1,1,1,1). Therefore, a(1)=15.

%t Table[Length[Select[Flatten[Table[{n, k, j, i, BitXor[n, k, j, i]}, {n, 0, a}, {k, 0, a}, {j, 0, a}, {i, 0, a}], 3], Max[#] == a &]], {a, 0, 50}]

%Y Cf. A241523, A241717 (3 piles), A241718 (4 piles).

%K nonn

%O 0,2

%A _Tanya Khovanova_ and _Joshua Xiong_, Apr 27 2014