cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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 if r exists; otherwise a(n) = 0.

This page as a plain text file.
%I A052507 #8 Nov 24 2021 05:26:11
%S A052507 0,0,0,0,0,0,18,180,180,0,630,630,720,720,18,18,0,36,360,360,0,450,
%T A052507 450,180,180,90,90,180,180,720,72,72,0,198,702,1998,17010,17010,39600,
%U A052507 900,900,540,5400,44100,900,900,18,180,180,0,180,1800,9900,17100,17100
%N 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 <p if r exists; otherwise a(n) = 0.
%C A052507 The primes in P are required to have the same number of digits as p; thus internal 0's must remain internal 0's.
%C A052507 Computation of this sequence is more complicated than the Name implies. Taking each palindromic prime in turn (i.e., primes from A002385), find all permutations of its digits (without leading 0's) which are also prime (obviously there will be at least 1 such permutation). This gives the terms of A052480. Then considering each of those primes apply the rule in the Name to determine q or r or 0. - _Sean A. Irvine_, Nov 23 2021
%H A052507 Sean A. Irvine, <a href="https://github.com/archmageirvine/joeis/blob/master/src/irvine/oeis/a052/A052507.java">Java program</a> (github)
%e A052507 a(8)=180 because the distance from 131 to 311 is 180.
%Y A052507 Cf. A002385, A052495, A052480.
%K A052507 base,easy,nonn
%O A052507 1,7
%A A052507 _Enoch Haga_, Mar 17 2000