login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A143292 Gray code of prime(n) (decimal representation). 1
3, 2, 7, 4, 14, 11, 25, 26, 28, 19, 16, 55, 61, 62, 56, 47, 38, 35, 98, 100, 109, 104, 122, 117, 81, 87, 84, 94, 91, 73, 64, 194, 205, 206, 223, 220, 211, 242, 244, 251, 234, 239, 224, 161, 167, 164, 186, 176, 146, 151, 157, 152, 137, 134, 385, 388, 395, 392, 415 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

LINKS

Author?, Mathematica Notebook GrayCode.nb

Eric Weisstein, Gray code.

FORMULA

a(n) = A003188(A000040(n)). - R. J. Mathar, Nov 11 2011

MATHEMATICA

GrayCodeList[k_] := Module[{b = IntegerDigits[k, 2], i}, Do[ If[b[[i - 1]] == 1, b[[i]] = 1 - b[[i]]], {i, Length[b], 2, -1} ]; b ]; FromGrayCodeList[d_] := Module[{b = d, i, j}, Do[ If[Mod[Sum[b[[j]], {j, i - 1}], 2] == 1, b[[i]] = 1 - b[[i]]], {i, n = Length[d], 2, -1} ]; FromDigits[b, 2] ]; GrayCode[i_, n_] :=

CROSSREFS

Sequence in context: A113658 A059029 A056434 * A075627 A011384 A128140

Adjacent sequences:  A143289 A143290 A143291 * A143293 A143294 A143295

KEYWORD

nonn

AUTHOR

Roger L. Bagula and Gary W. Adamson (rlbagulatftn(AT)yahoo.com), Oct 21 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 08:13 EST 2012. Contains 205893 sequences.