login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A281382 Numbers n such that the decimal equivalent of the binary reflected Gray code representation of n is a palindromic prime. 2
2, 3, 5, 6, 13, 70, 213, 217, 229, 253, 422, 426, 446, 465, 534, 541, 705, 741, 857, 869, 8441, 8481, 9190, 9221, 9293, 10210, 10349, 10453, 10929, 11049, 12006, 12281, 12329, 12721, 12793, 14109, 14282, 20578, 20934, 21009, 21629, 21701, 22810, 22866, 23221, 23421, 28705, 29397 (list; graph; refs; listen; history; text; internal format)
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

Cf. A002385, A003188.

Sequence in context: A075371 A218948 A057704 * A078203 A285937 A253647

Adjacent sequences:  A281379 A281380 A281381 * A281383 A281384 A281385

KEYWORD

nonn,base

AUTHOR

Indranil Ghosh, Jan 21 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 10:24 EDT 2019. Contains 322422 sequences. (Running on oeis4.)