cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A007809 Smallest prime with n distinct digits.

Original entry on oeis.org

2, 13, 103, 1039, 10243, 102359, 1023467, 10234589, 102345689
Offset: 1

Views

Author

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

Keywords

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 1039, p.126, Ellipses, Paris 2008. [From Lekraj Beedassy, Oct 12 2008]

Crossrefs

Programs

  • Mathematica
    Table[Module[{k=NextPrime[10^n]},While[Max[DigitCount[k]]>1,k=NextPrime[k]];k],{n,0,8}] (* Harvey P. Dale, May 27 2025 *)
  • PARI
    A007809(n,p=A038378(n))={until(isprime(p),while(#Set(digits(p++))M. F. Hasler, May 04 2017
    
  • Python
    from sympy import nextprime
    def a(n):
      p = nextprime(10**(n-1))
      while len(set(str(p))) < n: p = nextprime(p)
      return p
    for n in range(1, 10):
      print(a(n), end=", ") # Michael S. Branicky, Feb 13 2021

Extensions

Corrected by Jud McCranie, Jan 03 2001