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.

A259146 Smallest prime with first n digits distinct.

Original entry on oeis.org

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

Views

Author

Zak Seidov, Jun 19 2015

Keywords

Comments

The sequence is complete: n=1..10.

Crossrefs

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