cp's OEIS Frontend

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.

A238759 The number of P-positions in the game of Nim with up to five piles, allowing for piles of zero, such that the total number of objects in all piles is 2n.

This page as a plain text file.
%I A238759 #26 Apr 02 2020 03:10:38
%S A238759 1,10,15,100,65,150,175,1000,565,650,475,1500,925,1750,1875,10000,
%T A238759 5565,5650,3475,6500,3725,4750,3875,15000,8425,9250,6375,17500,10625,
%U A238759 18750,19375,100000,55565,55650,33475,56500,31725,34750,23875,65000
%N A238759 The number of P-positions in the game of Nim with up to five piles, allowing for piles of zero, such that the total number of objects in all piles is 2n.
%C A238759 First differences of A238147.
%H A238759 T. Khovanova and J. Xiong, <a href="http://arxiv.org/abs/1405.5942">Nim Fractals</a>, arXiv:1405.594291 [math.CO] (2014), p. 17 and <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Khovanova/khova6.html">J. Int. Seq. 17 (2014) # 14.7.8</a>.
%F A238759 a(2n+1) = 10*a(n), a(2n+2) = a(n+1) + 5*a(n).
%e A238759 The P-positions with the total of 4 are permutations of (0,0,0,2,2) and (0,1,1,1,1). Therefore, a(2)=15.
%t A238759 Table[Length[
%t A238759   Select[Flatten[
%t A238759     Table[{n, k, j, i, BitXor[n, k, j, i]}, {n, 0, a}, {k, 0, a}, {j,
%t A238759       0, a}, {i, 0, a}], 3], Total[#] == a &]], {a, 0, 90, 2}]
%t A238759 (* Second program: *)
%t A238759 (* b = A238147 *) b[n_] := b[n] = Which[n <= 1, {1, 11}[[n+1]], OddQ[n], 11 b[(n-1)/2] + 5 b[(n-1)/2 - 1], EvenQ[n], b[(n-2)/2 + 1] + 15 b[(n-2)/2]];
%t A238759 Join[{1}, Differences[Array[b, 40, 0]]] (* _Jean-François Alcover_, Dec 14 2018 *)
%Y A238759 Cf. A238147 (partial sums), A048883 (3 piles), A237711 (4 piles), A241523, A241731.
%K A238759 nonn
%O A238759 0,2
%A A238759 _Tanya Khovanova_ and _Joshua Xiong_, May 02 2014