OFFSET
1,1
COMMENTS
The last term is a(33950) = 9876413. - Giovanni Resta, Mar 19 2013
There are 33,950 terms in the sequence. - Harvey P. Dale, Jun 01 2024
LINKS
Daniel Starodubtsev, Table of n, a(n) for n = 1..33950 (complete sequence, terms 1..10000 from Nathaniel Johnston)
EXAMPLE
a(1)=1023467 because it is the first (smallest) 7-digit prime with all distinct digits.
MAPLE
lim:=pi(1026439): for n from pi(1000000) to lim do p:=ithprime(n): d:=[op(convert(p, base, 10))]: ddig:=true: for k from 0 to 9 do if(numboccur(k, d)>1)then ddig:=false: break: fi: od: if(ddig)then printf("%d, ", p): fi: od: # Nathaniel Johnston, Jun 22 2011
MATHEMATICA
Select[Range[1023457, 9876543, 2], Length[Union[IntegerDigits[ # ]]]==7 &&PrimeQ[ # ]&]
Select[FromDigits/@Permutations[Range[0, 9], {7}], IntegerLength[#]==7&&PrimeQ[#]&] (* Harvey P. Dale, Jun 01 2024 *)
PROG
(PARI) is(n)=isprime(n) && #digits(n)==7 && #Set(digits(n))==7 \\ Charles R Greathouse IV, Feb 11 2017
CROSSREFS
KEYWORD
fini,full,nonn,base,easy
AUTHOR
Zak Seidov, Aug 30 2002
STATUS
approved