OFFSET
1,1
COMMENTS
There are exactly 2529 five-digit primes with all distinct digits. The end of the sequence is: 97241, 97283, 97301, 97381, 97423, 97453, 97463, 97501, 97523, 97561, 97583, 97613, 97651, 97813, 97841, 97843, 97861, 98017, 98041, 98047, 98057, 98123, 98143, 98207, 98213, 98251, 98257, 98317, 98321, 98327, 98347, 98407, 98453, 98467, 98473, 98507, 98543, 98561, 98563, 98573, 98621, 98627, 98641, 98713, 98731.
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..2529 (full sequence)
EXAMPLE
a(1)=10243 and a(2529)=98731 because these are the first and the last 5-digit primes with all distinct digits.
MATHEMATICA
Select[Range[10243, 98731, 2], Length[Union[IntegerDigits[ # ]]]==5&&PrimeQ[ # ]&]
Select[Prime[Range[1230, 9592]], Max[DigitCount[#]]==1&] (* Harvey P. Dale, Mar 16 2016 *)
PROG
(PARI) is(n)=isprime(n) && #digits(n)==5 && #Set(digits(n))==5 \\ Charles R Greathouse IV, Feb 11 2017
CROSSREFS
KEYWORD
fini,full,nonn,base
AUTHOR
Zak Seidov, Aug 30 2002
STATUS
approved