login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A048054 Number of n-digit reversible primes (emirps). 25

%I #44 Oct 12 2023 03:07:38

%S 4,9,43,204,1499,9538,71142,535578,4197196,33619380,274932272,

%T 2294771254,19489886063,167630912672,1456476399463

%N Number of n-digit reversible primes (emirps).

%C The count includes palindromes.

%H 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 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 2, 3, 5 and 7 are 1-digit reversible primes, so a(1)=4.

%t Count[Range[10^(# - 1), 10^# - 1], n_ /; And[PrimeQ@ n, PrimeQ@ FromDigits@ Reverse@ IntegerDigits@ n]] & /@ Range@ 7 (* _Michael De Vlieger_, Jul 14 2015 *)

%o (Python)

%o from sympy import isprime, primerange

%o def A048054(n):

%o return len([p for p in primerange(10**(n-1),10**n)

%o if isprime(int(str(p)[::-1]))]) # _Chai Wah Wu_, Aug 14 2014

%Y Cf. A003684, A006567, A007628, A046732, A048051, A048052, A048053, A048895.

%K base,nonn,more

%O 1,1

%A _Jud McCranie_

%E a(11)-a(13) from _Giovanni Resta_, Jul 19 2015

%E a(14)-a(15) from Cécile Dartyge, Bruno Martin, Joël Rivat, Igor E. Shparlinski, and _Cathy Swaenepoel_, Oct 05 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 09:04 EDT 2024. Contains 371240 sequences. (Running on oeis4.)