login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A281553 Write n in binary reflected Gray code, rotate one binary place to the right and convert the code back to decimal. 1
0, 1, 3, 1, 3, 7, 6, 2, 6, 14, 15, 7, 5, 13, 12, 4, 12, 28, 29, 13, 15, 31, 30, 14, 10, 26, 27, 11, 9, 25, 24, 8, 24, 56, 57, 25, 27, 59, 58, 26, 30, 62, 63, 31, 29, 61, 60, 28, 20, 52, 53, 21, 23, 55, 54, 22, 18, 50, 51, 19, 17, 49, 48, 16, 48, 112, 113, 49, 51, 115, 114, 50, 54, 118 (list; graph; refs; listen; history; text; internal format)
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

Cf. A003188, A014550, A038572.

Sequence in context: A035619 A280995 A092689 * A064434 A328988 A086401

Adjacent sequences:  A281550 A281551 A281552 * A281554 A281555 A281556

KEYWORD

nonn,base

AUTHOR

Indranil Ghosh, Jan 24 2017

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 28 06:08 EDT 2021. Contains 346317 sequences. (Running on oeis4.)