The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A003684 Number of n-digit reversible primes (or emirps) with distinct digits. 12
 4, 8, 22, 84, 402, 1218, 3572, 8218, 11804 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS EXAMPLE 13, 17, 31, 37, 71, 73, 79 and 97 are reversible primes (emirps), so a(2)=8. MATHEMATICA emrpQ[n_]:=Module[{idn=IntegerDigits[n], rev}, rev=Reverse[idn]; rev!=idn && Max[DigitCount[n]]==1&&PrimeQ[FromDigits[rev]]]; With[{ems=Select[ Prime[ Range[ 51*10^6]], emrpQ]}, Join[ {4}, Table[Count[ems, _?(IntegerLength[ #] == n&)], {n, 2, 9}]]] (* Harvey P. Dale, Nov 29 2014 *) PROG (Python) from sympy import primerange, isprime def A003684(n):     return len([p for p in primerange(10**(n-1), 10**n)     if len(set(str(p))) == len(str(p)) and isprime(int(str(p)[::-1]))]) # Chai Wah Wu, Aug 14 2014 CROSSREFS Cf. A006567, A007628, A046732, A048051, A048052, A048053, A048054, A048895. Sequence in context: A057583 A129788 A170938 * A254404 A254403 A075688 Adjacent sequences:  A003681 A003682 A003683 * A003685 A003686 A003687 KEYWORD nonn,fini,full,base,easy,nice AUTHOR EXTENSIONS Typo in example corrected by David Ritterskamp (dritters(AT)usi.edu), Mar 24 2008 STATUS approved

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

Last modified May 27 21:52 EDT 2020. Contains 334671 sequences. (Running on oeis4.)