

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 threeheap 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

The following sequences all appear to have the same parity: A003071, A029886, A061297, A092524, A093431, A102393, A104258, A122248, A128975.  Jeremy Gardiner, Dec 28 2008


LINKS

Antti Karttunen, Table of n, a(n) for n = 1..65537
Tanya Khovanova, There are no coincidences, arXiv preprint 1410.2193, 2014


FORMULA

a(n)=0 if n is odd; otherwise, a(n) = ( 3^(r1)  1)/2, where r is the number of 1's in the binary expansion of n.


EXAMPLE

For example, a(14)=4; the four 3tuples are (1,6,7), (2,5,7), (3,4,7) and (3,5,6).


PROG

(PARI) A128975(n) = if(n%2, 0, (1/2)*((3^(hammingweight(n)1))1)); \\ Antti Karttunen, Sep 25 2018


CROSSREFS

Cf. A000120, A003987.
Sequence in context: A070206 A228368 A267701 * A245817 A277115 A291447
Adjacent sequences: A128972 A128973 A128974 * A128976 A128977 A128978


KEYWORD

easy,nonn


AUTHOR

Jacob A. Siehler, Apr 29 2007


STATUS

approved



