|
%I
%S 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,
%T 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,
%U 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
%N 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.
%C The following sequences all appear to have the same parity: A003071, A029886, A061297, A092524, A093431, A102393, A104258, A122248, A128975. - Jeremy Gardiner, Dec 28 2008
%F 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.
%e For example, a(14)=4; the four 3-tuples are (1,6,7), (2,5,7), (3,4,7) and (3,5,6).
%K easy,nonn
%O 1,14
%A _Jacob A. Siehler_, Apr 29 2007
|