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!)
A235000 Primes which become palindromic primes when the digits are rotated once to the right. 4
2, 3, 5, 7, 11, 199, 277, 311, 577, 733, 811, 877, 911, 977, 10133, 13177, 22277, 27211, 27277, 28211, 32377, 33311, 40499, 43411, 43499, 45433, 46499, 49499, 55511, 60611, 62633, 63611, 65633, 67699, 72733, 79777, 80833, 84811, 87833, 87877, 93911, 98911 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..10000

EXAMPLE

The prime 277 is in the sequence because 727 is a palindromic prime.

PROG

(PARI) rotr(a) = if(a<10, a, eval(Str(a%10, a\10)))

revint(n) = my(m=n%10); n\=10; while(n>0, m=m*10+n%10; n\=10); m

s=[]; forprime(n=2, 1000000, r=rotr(n); if(isprime(r) && revint(r)==r, s=concat(s, n))); s

(Python)

from sympy import isprime

def palQgen10(l): # generator of palindromes in base 10 of length <= 2*l

....if l > 0:

........yield 0

........for x in range(1, l+1):

............for y in range(10**(x-1), 10**x):

................s = str(y)

................yield int(s+s[-2::-1])

............for y in range(10**(x-1), 10**x):

................s = str(y)

................yield int(s+s[::-1])

A235000_list = []

for x in palQgen10(5):

....s = str(x)

....y = int(s[1:]+s[0])

....if (s[1] if len(s) > 1 else []) != '0' and isprime(x) and isprime(y):

........A235000_list.append(y)

A235000_list = sorted(A235000_list) # Chai Wah Wu, Dec 21 2014

CROSSREFS

Cf. A234912.

Sequence in context: A241724 A186449 A046480 * A067906 A029980 A046481

Adjacent sequences:  A234997 A234998 A234999 * A235001 A235002 A235003

KEYWORD

nonn,base,less

AUTHOR

Colin Barker, Jan 02 2014

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 May 27 03:13 EDT 2022. Contains 354093 sequences. (Running on oeis4.)