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
Andrew Howroyd, Table of n, a(n) for n = 0..1023
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
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