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.
%I A309321 #39 May 14 2023 04:14:09 %S A309321 0,0,0,0,20,5,3,5,0,21,5,2,1,52,4,3,0,17,0,1104,21,7,73,9,105,35,8,54, %T A309321 51,11,34,43,78,8,52,29,19,10,80,50,22,33,78,53,9,994,11,17,26,7,20, %U A309321 49,75,12,109,100,27,16,12,16,32,48,28,69,32,42,6,56,48 %N A309321 The number of primes between two consecutive palindromic primes, bounds excluded. %H A309321 Amiram Eldar, <a href="/A309321/b309321.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Hauke Löffler) %F A309321 a(n) = A075807(n+1) - A075807(n) - 1. - _Jinyuan Wang_, Jul 24 2019 %e A309321 a(0): Between the first two palindromic primes (2,3) there are 0 primes. %e A309321 a(6): Between 101 and 131 there are 5 primes (103, 107, 109, 113, 127). %o A309321 (SageMath) %o A309321 #Palindromic primes %o A309321 def count_primes_between(a,b): %o A309321 return len(prime_range(a+1,b)) %o A309321 [count_primes_between(A002385[i],A002385[i+1]) for i in range (len(A002385)-1)] %o A309321 # Alternative: %o A309321 def A309321list(bound): %o A309321 L = []; p = 2 %o A309321 while p < bound: %o A309321 p = next_prime(p) %o A309321 delta = 0 %o A309321 while not Word(p.digits()).is_palindrome(): %o A309321 delta += 1 %o A309321 p = next_prime(p) %o A309321 L.append(delta) %o A309321 return L %o A309321 A309321list(18181) # _Peter Luschny_, Jul 23 2019 %Y A309321 Cf. A002385, A037010, A075807, A176559. %K A309321 nonn,base %O A309321 1,5 %A A309321 _Hauke Löffler_, Jul 23 2019