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!)
A309321 The number of primes between two consecutive palindromic primes, bounds excluded. 1
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, 51, 11, 34, 43, 78, 8, 52, 29, 19, 10, 80, 50, 22, 33, 78, 53, 9, 994, 11, 17, 26, 7, 20, 49, 75, 12, 109, 100, 27, 16, 12, 16, 32, 48, 28, 69, 32, 42, 6, 56, 48 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Hauke Löffler)
FORMULA
a(n) = A075807(n+1) - A075807(n) - 1. - Jinyuan Wang, Jul 24 2019
EXAMPLE
a(0): Between the first two palindromic primes (2,3) there are 0 primes.
a(6): Between 101 and 131 there are 5 primes (103, 107, 109, 113, 127).
PROG
(SageMath)
#Palindromic primes
def count_primes_between(a, b):
return len(prime_range(a+1, b))
[count_primes_between(A002385[i], A002385[i+1]) for i in range (len(A002385)-1)]
# Alternative:
def A309321list(bound):
L = []; p = 2
while p < bound:
p = next_prime(p)
delta = 0
while not Word(p.digits()).is_palindrome():
delta += 1
p = next_prime(p)
L.append(delta)
return L
A309321list(18181) # Peter Luschny, Jul 23 2019
CROSSREFS
Sequence in context: A018816 A040389 A040386 * A104158 A068612 A233820
KEYWORD
nonn,base
AUTHOR
Hauke Löffler, Jul 23 2019
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 September 3 15:14 EDT 2024. Contains 375672 sequences. (Running on oeis4.)