OFFSET
0,2
COMMENTS
This is the finite difference of A241523.
LINKS
T. Khovanova and J. Xiong, Nim Fractals, arXiv:1405.594291 [math.CO] (2014), p. 9 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)= 10*2^(2*b)*(2*c-1) + 20*c^3 - 30*c^2 + 20*c - 5.
EXAMPLE
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.
MATHEMATICA
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}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Tanya Khovanova and Joshua Xiong, Apr 27 2014
STATUS
approved