OFFSET
1,1
COMMENTS
Numbers n such that A003188(n) is both prime and palindromic.
LINKS
Indranil Ghosh and Chai Wah Wu, Table of n, a(n) for n = 1..13824, first 1281 terms from Indranil Ghosh.
EXAMPLE
213 is in the sequence because A003188(213) = 191 and 191 is a palindromic prime.
MATHEMATICA
Select[Range@ 30000, And[PrimeQ@ #, Reverse@ # == # &@ IntegerDigits@ #] &@ BitXor[#, Floor[#/2]] &] (* Michael De Vlieger, Mar 30 2017 *)
PROG
(Python)
from sympy import isprime
def G(n):
....return int(bin(n^(n/2))[2:], 2)
i=0
j=1
while j<=1281:
....if G(i)==int(str(G(i))[::-1]) and isprime(G(i))==True:
........print str(j)+" "+str(i)
........j+=1
....i+=1
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Indranil Ghosh, Jan 21 2017
STATUS
approved