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
KEYWORD
nonn
AUTHOR
Tanya Khovanova and Joshua Xiong, Apr 27 2014
STATUS
approved