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!)
A281227 Primes whose binary reflected Gray code representation is also the decimal representation of a prime. 2
2, 53, 233, 281, 397, 521, 613, 673, 733, 773, 797, 829, 1049, 1129, 1433, 1553, 1697, 1933, 2129, 2237, 2273, 2281, 2437, 2521, 2557, 2617, 2729, 2969, 3121, 3181, 3413, 3457, 3517, 3637, 3709, 3761, 3881, 4337, 4357, 4729, 4733, 4877, 4889, 5101, 5657, 5813, 5857, 6113, 6133 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
521 is in the sequence because 521_10 = 1100001101_2 and both 521 and 1100001101 are prime numbers in base 10.
PROG
(Python)
from sympy import isprime
def gray(n):
....return bin(n^(n/2))[2:]
i=1
j=1
while j<=481:
....if isprime(i)==True and isprime(int(gray(i)))==True:
........print str(j)+" "+str(i)
........j+=1
....i+=1
CROSSREFS
Sequence in context: A248994 A212242 A123005 * A142477 A119112 A356488
KEYWORD
nonn,base
AUTHOR
Indranil Ghosh, Jan 18 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 8 08:54 EDT 2024. Contains 375753 sequences. (Running on oeis4.)