login
Largest prime with n distinct decimal digits.
11

%I #14 Sep 16 2019 17:11:06

%S 7,97,983,9871,98731,987631,9876413,98765431,987654103

%N Largest prime with n distinct decimal digits.

%C Differs from A071361 from a(7) on. - _M. F. Hasler_, May 03 2017

%D J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 9871, p.194, Ellipses, Paris 2008.

%t Table[Module[{k=NextPrime[10^n-1,-1]},While[Max[DigitCount[k]]>1, k = NextPrime[ k,-1]];k],{n,9}] (* _Harvey P. Dale_, Sep 16 2019 *)

%o (PARI) A007810(n,p=sum(k=1,n,(9+k-n)*10^k)/10)={until(#Set(digits(p--))==n&&isprime(p),);p} \\ _M. F. Hasler_, May 03 2017

%Y Cf. A071360, A071361, A071362, A071363.

%K nonn,fini,base,full

%O 1,1

%A N. B. Backhouse (sx52(AT)liverpool.ac.uk)