OFFSET
1,1
COMMENTS
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
EXAMPLE
MAPLE
revdigs:= proc(n) local L; L:= convert(n, base, 2); add(L[-i]*2^(i-1), i=1..nops(L)) end proc:
filter:= proc(t) local r; if not isprime(t) then return false fi;
r:= revdigs(t); r <> t and isprime(r) end proc:
select(filter, [seq(i, i=3..10000, 2)]); # Robert Israel, Aug 30 2016
PROG
(Python)
from sympy import isprime
def ok(n):
r = int(bin(n)[2:][::-1], 2)
return n != r and isprime(n) and isprime(r)
print([k for k in range(600) if ok(k)]) # Michael S. Branicky, Jul 30 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Mar 25 2003
STATUS
approved