|
|
A128975
|
|
a(n) = the number of unordered triples of integers (a,b,c) with a+b+c=n, whose bitwise XOR is zero. Equivalently, the number of three-heap nim games with n stones which are in a losing position for the first player.
|
|
10
|
|
|
0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 4, 0, 0, 0, 1, 0, 1, 0, 4, 0, 1, 0, 4, 0, 4, 0, 13, 0, 0, 0, 1, 0, 1, 0, 4, 0, 1, 0, 4, 0, 4, 0, 13, 0, 1, 0, 4, 0, 4, 0, 13, 0, 4, 0, 13, 0, 13, 0, 40, 0, 0, 0, 1, 0, 1, 0, 4, 0, 1, 0, 4, 0, 4, 0, 13, 0, 1, 0, 4, 0, 4, 0, 13, 0, 4, 0, 13, 0, 13, 0, 40, 0, 1, 0, 4, 0, 4, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,14
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
a(n)=0 if n is odd; otherwise, a(n) = ( 3^(r-1) - 1)/2, where r is the number of 1's in the binary expansion of n.
|
|
EXAMPLE
|
For example, a(14)=4; the four 3-tuples are (1,6,7), (2,5,7), (3,4,7) and (3,5,6).
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|