%I #18 Aug 22 2019 18:15:15
%S 10243,10247,10253,10259,10267,10273,10289,10357,10369,10427,10429,
%T 10453,10457,10459,10463,10487,10529,10567,10589,10597,10627,10639,
%U 10657,10687,10723,10729,10739,10753,10789,10837,10847,10853,10859,10867,10937,10957
%N Five-digit distinct-digit primes.
%C 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.
%H Nathaniel Johnston, <a href="/A074671/b074671.txt">Table of n, a(n) for n = 1..2529</a> (full sequence)
%e a(1)=10243 and a(2529)=98731 because these are the first and the last 5-digit primes with all distinct digits.
%t Select[Range[10243, 98731, 2], Length[Union[IntegerDigits[ # ]]]==5&&PrimeQ[ # ]&]
%t Select[Prime[Range[1230,9592]],Max[DigitCount[#]]==1&] (* _Harvey P. Dale_, Mar 16 2016 *)
%o (PARI) is(n)=isprime(n) && #digits(n)==5 && #Set(digits(n))==5 \\ _Charles R Greathouse IV_, Feb 11 2017
%Y The first differences are in A074672. 4-digit distinct-digit primes are in A074673. 6-digit distinct-digit primes are in A074669, see also A074670. 7-digit distinct-digit primes are in A074667, see also A074668. 8-digit distinct-digit primes are in A074665, see also A074666.
%K fini,full,nonn,base
%O 1,1
%A _Zak Seidov_, Aug 30 2002
|