A052507
Take n-th palindromic prime p, let P = all primes having same digits; a(n) = q-p where q is smallest prime in P >p if q exists; otherwise a(n) = p-r where r is largest prime in P
0, 0, 0, 0, 0, 0, 18, 180, 180, 0, 630, 630, 720, 720, 18, 18, 0, 36, 360, 360, 0, 450, 450, 180, 180, 90, 90, 180, 180, 720, 72, 72, 0, 198, 702, 1998, 17010, 17010, 39600, 900, 900, 540, 5400, 44100, 900, 900, 18, 180, 180, 0, 180, 1800, 9900, 17100, 17100
Offset: 1
Examples
a(8)=180 because the distance from 131 to 311 is 180.
Links
- Sean A. Irvine, Java program (github)
Comments