A060568 Number of primes between n and R(n) where R(n) (A004086) is the digit reversal of n.
0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 3, 4, 6, 9, 11, 12, 15, 16, 7, 3, 0, 2, 4, 6, 9, 11, 13, 14, 8, 4, 2, 0, 2, 4, 7, 8, 10, 12, 10, 6, 4, 2, 0, 2, 4, 6, 8, 9, 12, 9, 6, 4, 2, 0, 2, 5, 7, 7, 14, 11, 9, 7, 4, 2, 0, 2, 4, 5, 15, 12, 11, 8, 6, 5, 2, 0, 2, 2, 18, 15, 13, 10, 8, 7, 4, 2, 0, 1, 20, 16, 14
Offset: 1
Examples
a(10) = 4, as there are four primes between 10 and 1.
Links
- John Tyler Rascoe, Table of n, a(n) for n = 1..10000
Programs
-
Python
from sympy import primerange def A060568(n): x = (n, int(str(n)[::-1],10)) return len([i for i in primerange(min(x)+1,max(x))]) # John Tyler Rascoe, Jan 13 2025
Extensions
More terms from Larry Reeves (larryr(AT)acm.org), May 10 2001