login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A143292 Gray code of prime(n) (decimal representation). 3
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; text; internal format)
OFFSET
1,1
LINKS
Eric Weisstein, Gray code.
FORMULA
a(n) = A003188( A000040(n) ). - R. J. Mathar, Nov 11 2011
MAPLE
with(Bits):: seq(Xor(ithprime(n), (ithprime(n)-1)/2), n=2..50) # Gary Detlefs, Aug 03 2013
PROG
(PARI) a(n)=bitxor(n=prime(n), n>>1) \\ Charles R Greathouse IV, Apr 19 2012
(Python)
from sympy import prime
def A143292(n): return (p:=prime(n))^ p>>1 # Chai Wah Wu, Jun 29 2022
CROSSREFS
Sequence in context: A059029 A360968 A056434 * A293447 A324867 A265386
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)