1,4

The number of positive integers k < n such that n XOR k = (n-k) is A038573(n).

Table of n, a(n) for n=1..93.

a(n) = -1 + 2^(number of 0's in binary expansion of n). a(n) = 2^A080791(n) - 1 = A080100(n) - 1.

(PARI) a(n)=sum(k=1, n, if(bitxor(n, k)==(n+k), 1, 0))

Cf. A080791, A080100, A038573.

Sequence in context: A124801 A124926 A175946 * A120060 A143295 A289978

Adjacent sequences: A115375 A115376 A115377 * A115379 A115380 A115381

nonn

Paul D. Hanna, Jan 21 2006

approved