OFFSET
1,1
COMMENTS
The count includes palindromes.
LINKS
J. L. Boal and J. H. Bevis, Permutable primes. Math. Mag., 55 (N0. 1, 1982), 38-41. [From N. J. A. Sloane, Jan 19 2012]
Cécile Dartyge, Bruno Martin, Joël Rivat, Igor E. Shparlinski, and Cathy Swaenepoel, Reversible primes, arXiv:2309.11380 [math.NT], 2023. See p. 36.
EXAMPLE
2, 3, 5 and 7 are 1-digit reversible primes, so a(1)=4.
MATHEMATICA
Count[Range[10^(# - 1), 10^# - 1], n_ /; And[PrimeQ@ n, PrimeQ@ FromDigits@ Reverse@ IntegerDigits@ n]] & /@ Range@ 7 (* Michael De Vlieger, Jul 14 2015 *)
PROG
(Python)
from sympy import isprime, primerange
def A048054(n):
return len([p for p in primerange(10**(n-1), 10**n)
if isprime(int(str(p)[::-1]))]) # Chai Wah Wu, Aug 14 2014
CROSSREFS
KEYWORD
base,nonn,more
AUTHOR
EXTENSIONS
a(11)-a(13) from Giovanni Resta, Jul 19 2015
a(14)-a(15) from Cécile Dartyge, Bruno Martin, Joël Rivat, Igor E. Shparlinski, and Cathy Swaenepoel, Oct 05 2023
STATUS
approved