A074673 Four-digit distinct-digit primes.
1039, 1049, 1063, 1069, 1087, 1093, 1097, 1237, 1249, 1259, 1279, 1283, 1289, 1297, 1307, 1327, 1367, 1409, 1423, 1427, 1429, 1439, 1453, 1459, 1483, 1487, 1489, 1493, 1523, 1543, 1549, 1567, 1579, 1583, 1597, 1607, 1609, 1627, 1637, 1657, 1693, 1697
Offset: 1
Examples
a(1) = 1039 and a(510) = 9871 because these are the first and the last four-digit primes with all distinct digits.
Links
- Nathaniel Johnston, Table of n, a(n) for n = 1..510 (full sequence)
Crossrefs
Programs
-
Mathematica
Select[Range[1001, 9999, 2], Length[Union[IntegerDigits[#]]] == 4 && PrimeQ[#] &] (* Corrected by Harvey P. Dale, Jan 17 2011 *) Select[Prime[Range[168,1229]],Max[DigitCount[#]]==1&] (* Harvey P. Dale, Aug 22 2019 *)
-
PARI
is(n)=isprime(n) && #digits(n)==4 && #Set(digits(n))==4 \\ Charles R Greathouse IV, Feb 11 2017
Comments