login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of primes between n and R(n) where R(n) (A004086) is the digit reversal of n.
2

%I #7 Jan 13 2025 17:34:42

%S 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,

%T 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,

%U 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

%N Number of primes between n and R(n) where R(n) (A004086) is the digit reversal of n.

%H John Tyler Rascoe, <a href="/A060568/b060568.txt">Table of n, a(n) for n = 1..10000</a>

%e a(10) = 4, as there are four primes between 10 and 1.

%o (Python)

%o from sympy import primerange

%o def A060568(n):

%o x = (n, int(str(n)[::-1],10))

%o return len([i for i in primerange(min(x)+1,max(x))]) # _John Tyler Rascoe_, Jan 13 2025

%Y Cf. A000720, A074813.

%K nonn,base,easy,changed

%O 1,10

%A _Amarnath Murthy_, Apr 27 2001

%E More terms from Larry Reeves (larryr(AT)acm.org), May 10 2001