cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A281227 Primes whose binary reflected Gray code representation is also the decimal representation of a prime.

Original entry on oeis.org

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
Offset: 1

Views

Author

Indranil Ghosh, Jan 18 2017

Keywords

Examples

			521 is in the sequence because 521_10 = 1100001101_2 and both 521 and 1100001101 are prime numbers in base 10.
		

Crossrefs

Programs

  • 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