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!)
A014550 Binary reflected Gray code. 16
0, 1, 11, 10, 110, 111, 101, 100, 1100, 1101, 1111, 1110, 1010, 1011, 1001, 1000, 11000, 11001, 11011, 11010, 11110, 11111, 11101, 11100, 10100, 10101, 10111, 10110, 10010, 10011, 10001, 10000, 110000, 110001, 110011, 110010, 110110 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

REFERENCES

Gardner, M. "The Binary Gray Code." Ch. 2 in Knotted Doughnuts and Other Mathematical Entertainments. New York: W. H. Freeman, 1986.

C. A. Pickover, The Math Book, Sterling, NY, 2009; see p. 392.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..8191

Eric Weisstein's World of Mathematics, Gray Code

MAPLE

a:= proc(n) option remember; `if`(n<2, n,

      (b-> 10^b +a(2^(b+1)-1-n))(ilog2(n)))

    end:

seq(a(n), n=0..50);  # Alois P. Heinz, Nov 01 2008

MATHEMATICA

a[n_] := a[n] = (b = Floor[Log[2, n]]; If[n <= 1, n, 10^b + a[2^(b + 1) - 1 - n]]); Table[a[n], {n, 0, 36}] (* Jean-Fran├žois Alcover, Oct 11 2012, after Alois P. Heinz *)

PROG

(PARI) a(n)=fromdigits(binary(bitxor(n, n>>1))) \\ Charles R Greathouse IV, Feb 06 2017

CROSSREFS

Same sequence in decimal: A003188.

Sequence in context: A304747 A304749 A105028 * A070836 A063432 A038324

Adjacent sequences:  A014547 A014548 A014549 * A014551 A014552 A014553

KEYWORD

nonn,nice,easy

AUTHOR

Eric W. Weisstein

EXTENSIONS

More terms from Larry Reeves (Larryr(AT)acm.org), Sep 05 2000

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 April 7 13:36 EDT 2020. Contains 333305 sequences. (Running on oeis4.)