login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A115378 a(n) = number of positive integers k < n such that n XOR k = (n+k). 2
0, 1, 0, 3, 1, 1, 0, 7, 3, 3, 1, 3, 1, 1, 0, 15, 7, 7, 3, 7, 3, 3, 1, 7, 3, 3, 1, 3, 1, 1, 0, 31, 15, 15, 7, 15, 7, 7, 3, 15, 7, 7, 3, 7, 3, 3, 1, 15, 7, 7, 3, 7, 3, 3, 1, 7, 3, 3, 1, 3, 1, 1, 0, 63, 31, 31, 15, 31, 15, 15, 7, 31, 15, 15, 7, 15, 7, 7, 3, 31, 15, 15, 7, 15, 7, 7, 3, 15, 7, 7, 3, 7, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
The number of positive integers k < n such that n XOR k = (n-k) is A038573(n).
LINKS
FORMULA
a(n) = -1 + 2^(number of 0's in binary expansion of n). a(n) = 2^A080791(n) - 1 = A080100(n) - 1.
PROG
(PARI) a(n)=sum(k=1, n, if(bitxor(n, k)==(n+k), 1, 0))
CROSSREFS
Sequence in context: A124801 A124926 A175946 * A120060 A143295 A330892
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jan 21 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 05:19 EDT 2024. Contains 371782 sequences. (Running on oeis4.)