OFFSET
1,1
COMMENTS
There are exactly 10239 six-digit primes with distinct digits.
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..10239 (full sequence)
EXAMPLE
a(1)=102359 because it is the first (smallest) 6-digit primes with all distinct digits.
MATHEMATICA
Select[Range[100001, 999999, 2], Length[Union[IntegerDigits[ # ]]]==6 && PrimeQ[ # ]&]
Take[Select[Prime[Range[PrimePi[100000]+1, PrimePi[999999]]], Max[DigitCount[#]]==1&], 50] (* Harvey P. Dale, Jan 09 2011 *)
Select[Sort[FromDigits/@Flatten[Permutations/@Subsets[Range[0, 9], {6}], 1]], IntegerLength[#] == 6&&PrimeQ[#]&] (* Harvey P. Dale, Jul 28 2017 *)
PROG
(PARI) is(n)=isprime(n) && #digits(n)==6 && #Set(digits(n))==6 \\ Charles R Greathouse IV, Feb 11 2017
CROSSREFS
KEYWORD
fini,full,nonn,base
AUTHOR
Zak Seidov, Aug 30 2002
STATUS
approved