OFFSET
0,3
COMMENTS
a(n) = A003188(n), iff the Elias delta code for n contains all 1's without any zeros (see the example section).
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..10000
EXAMPLE
For n = 5, the binary reflected Gray code for n is '111'. Rotating one binary place to the right , '111' gives back '111' again. 111_2 = 7_10. So, a(5) = 7. (For n = 5, A003188(n) = 7).
For n = 15, the binary reflected Gray code for n is '1000'. Rotating one binary place to the right, '1000' gives '0100'. 100_2 = 4_10. So, a(15) = 4.
PROG
(Python)
def rotation(n):
....x=bin(n^(n/2))[2:]
....return int(x[-1]+x[:-1], 2)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Indranil Ghosh, Jan 24 2017
STATUS
approved