login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007809 Smallest prime with n distinct digits. 12

%I #23 Feb 13 2021 14:00:30

%S 2,13,103,1039,10243,102359,1023467,10234589,102345689

%N Smallest prime with n distinct digits.

%D J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 1039, p.126, Ellipses, Paris 2008. [From _Lekraj Beedassy_, Oct 12 2008]

%o (PARI) A007809(n,p=A038378(n))={until(isprime(p),while(#Set(digits(p++))<n,));p} \\ _M. F. Hasler_, May 04 2017

%o (Python)

%o from sympy import nextprime

%o def a(n):

%o p = nextprime(10**(n-1))

%o while len(set(str(p))) < n: p = nextprime(p)

%o return p

%o for n in range(1, 10):

%o print(a(n), end=", ") # _Michael S. Branicky_, Feb 13 2021

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

%K nonn,fini,base,full

%O 1,1

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

%E Corrected by _Jud McCranie_, Jan 03 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 4 23:47 EDT 2024. Contains 374017 sequences. (Running on oeis4.)