|
|
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
|
|
|
FORMULA
|
|
|
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))
# 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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|