login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Primes which become palindromic primes when the digits are rotated once to the left.
4

%I #10 Apr 12 2017 18:35:35

%S 2,3,5,7,11,101,113,331,337,991,1013,1019,3037,7079,9091,11131,11383,

%T 11393,11939,33151,33353,33757,70079,77191,77323,77747,77797,77969,

%U 77999,99787,100019,101141,101333,101383,101747,101797,101939,101999,303151,303727

%N Primes which become palindromic primes when the digits are rotated once to the left.

%H Chai Wah Wu, <a href="/A234912/b234912.txt">Table of n, a(n) for n = 1..10000</a>

%e The prime 113 is in the sequence because 131 is a palindromic prime.

%o (PARI) rotl(a) = my(b, c, d); b=#Str(a); c=floor(a/(10^(b-1))); d=a-c*(10^(b-1)); 10*d+c

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

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

%Y Cf. A235000.

%K nonn,base

%O 1,1

%A _Colin Barker_, Jan 02 2014