cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A048054 Number of n-digit reversible primes (emirps).

This page as a plain text file.
%I A048054 #44 Oct 12 2023 03:07:38
%S A048054 4,9,43,204,1499,9538,71142,535578,4197196,33619380,274932272,
%T A048054 2294771254,19489886063,167630912672,1456476399463
%N A048054 Number of n-digit reversible primes (emirps).
%C A048054 The count includes palindromes.
%H A048054 J. L. Boal and J. H. Bevis, <a href="http://www.jstor.org/stable/2689862">Permutable primes</a>. Math. Mag., 55 (N0. 1, 1982), 38-41. [From _N. J. A. Sloane_, Jan 19 2012]
%H A048054 Cécile Dartyge, Bruno Martin, Joël Rivat, Igor E. Shparlinski, and Cathy Swaenepoel, <a href="https://arxiv.org/abs/2309.11380">Reversible primes</a>, arXiv:2309.11380 [math.NT], 2023. See p. 36.
%e A048054 2, 3, 5 and 7 are 1-digit reversible primes, so a(1)=4.
%t A048054 Count[Range[10^(# - 1), 10^# - 1], n_ /; And[PrimeQ@ n, PrimeQ@ FromDigits@ Reverse@ IntegerDigits@ n]] & /@ Range@ 7 (* _Michael De Vlieger_, Jul 14 2015 *)
%o A048054 (Python)
%o A048054 from sympy import isprime, primerange
%o A048054 def A048054(n):
%o A048054     return len([p for p in primerange(10**(n-1),10**n)
%o A048054                 if isprime(int(str(p)[::-1]))]) # _Chai Wah Wu_, Aug 14 2014
%Y A048054 Cf. A003684, A006567, A007628, A046732, A048051, A048052, A048053, A048895.
%K A048054 base,nonn,more
%O A048054 1,1
%A A048054 _Jud McCranie_
%E A048054 a(11)-a(13) from _Giovanni Resta_, Jul 19 2015
%E A048054 a(14)-a(15) from Cécile Dartyge, Bruno Martin, Joël Rivat, Igor E. Shparlinski, and _Cathy Swaenepoel_, Oct 05 2023