OFFSET
1,1
COMMENTS
There are exactly 2529 five-digit primes with all distinct digits, so the sequence of differences is finite as well. The end of the sequence is: 42, 18, 80, 42, 30, 10, 38, 22, 38, 22, 30, 38, 162, 28, 2, 18, 156, 24, 6, 10, 66, 20, 64, 6, 38, 6, 60, 4, 6, 20, 60, 46, 14, 6, 34, 36, 18, 2, 10, 48, 6, 14, 72, 18.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..2528 (* Complete list of all terms *)
EXAMPLE
a(1)=4 because the first and second five-digit primes with all distinct digits are 10243, 10247 and difference between them is 4.
MATHEMATICA
se=Select[Range[10243, 98731, 2], Length[Union[IntegerDigits[ # ]]]==5&&PrimeQ[ # ]&]; Flatten[Table[{se[[i+1]]-se[[i]]}, {i, 2528}]]
Differences[Select[Prime[Range[PrimePi[10000]+1, PrimePi[99999]]], Max[ DigitCount[ #]] ==1&]] (* Harvey P. Dale, Jul 19 2019 *)
CROSSREFS
The first differences of the A074671. For 3-digit distinct-digit primes, see A074675, A074676. For 4-digit distinct-digit primes, see A074673, A074674. For 6-digit distinct-digit primes, see A074669, A074670. For 7-digit distinct-digit primes, see A074667, A074668. For 8-digit distinct-digit primes, see A074665, A074666.
KEYWORD
fini,full,nonn,base
AUTHOR
Zak Seidov, Aug 30 2002
STATUS
approved