Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A115378
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A115378 a(n) = number of positive integers k < n such that n XOR k = (n+k). +0
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; listen)
OFFSET

1,4

COMMENT

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

FORMULA

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

PROGRAM

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

CROSSREFS

Cf. A080791, A080100, A038573.

Sequence in context: A130160 A124801 A124926 this_sequence A120060 A143295 A104608

Adjacent sequences: A115375 A115376 A115377 this_sequence A115379 A115380 A115381

KEYWORD

nonn

AUTHOR

Paul D. Hanna (pauldhanna(AT)juno.com), Jan 21 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 18 20:14 EST 2008. Contains 147244 sequences.


AT&T Labs Research