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!)
A138954 Number of complement symmetries in the rotations of the binary expansion of a number. 2
0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,11
COMMENTS
It seems that the number of complement rotational symmetries is nonzero iff #0 = #1 in the binary expansion of a number.
The above statement is true in only one direction. It is clearly necessary for the number of 1 bits to equal the number of 0 bits. However, this is not sufficient. The first counterexample is n = 37 with binary expansion 100101 and complement 011010. Values of n for which a(n) is nonzero are therefore a proper subset of A031443. - Andrew Howroyd, Jan 12 2020
LINKS
EXAMPLE
a(2) = 1 because 2 has binary expansion 10 and the complement shows up once in rotations;
a(10) = 2 because 10 has binary expansion 1010 and its complement shows up twice in rotations.
PROG
(PARI) a(n)={my(s=0); if(n, my(b=logint(n, 2)+1); if(2*hammingweight(n)==b, my(w=2^b-1-n); for(i=2, b, w=if(w%2, w+2^b, w)\2; if(w==n, s++)))); s} \\ Andrew Howroyd, Jan 12 2020
CROSSREFS
Sequence in context: A350022 A348264 A127282 * A245811 A258822 A353373
KEYWORD
easy,nonn
AUTHOR
Max Sills, Apr 03 2008
EXTENSIONS
Missing a(8) inserted and terms a(21) and beyond from Andrew Howroyd, Jan 12 2020
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 25 11:06 EDT 2024. Contains 371967 sequences. (Running on oeis4.)