A259146 Smallest prime with first n digits distinct.
2, 13, 103, 1039, 10243, 102359, 1023467, 10234589, 102345689, 10234567897
Offset: 1
Programs
-
Python
from sympy import nextprime def a(n): p = nextprime(10**(n-1)) while len(set(str(p)[:n])) < n: p = nextprime(p) return p for n in range(1, 11): print(a(n), end=", ") # Michael S. Branicky, Feb 13 2021
Formula
a(n) = A007809(n), n<=9. - R. J. Mathar, Jul 06 2015
Comments