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.

Showing 1-6 of 6 results.

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

A007810 Largest prime with n distinct decimal digits.

Original entry on oeis.org

7, 97, 983, 9871, 98731, 987631, 9876413, 98765431, 987654103
Offset: 1

Views

Author

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

Keywords

Comments

Differs from A071361 from a(7) on. - M. F. Hasler, May 03 2017

References

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

Crossrefs

Programs

  • Mathematica
    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 *)
  • 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

A071360 Smallest n-digit prime with strictly decreasing digits.

Original entry on oeis.org

2, 31, 421, 5431, 75431, 764321, 8764321, 97654321
Offset: 1

Views

Author

Rick L. Shepherd, May 21 2002

Keywords

Crossrefs

A071361 Largest n-digit prime with strictly decreasing digits.

Original entry on oeis.org

7, 97, 983, 9871, 98731, 987631, 9875321, 98765431
Offset: 1

Views

Author

Rick L. Shepherd, May 21 2002

Keywords

Comments

Differs from A007810 (largest prime with n distinct digits) from a(7) on. [Edited by M. F. Hasler, May 03 2017]

Crossrefs

Programs

  • PARI
    A071361(n,u=-vectorv(n,i,10^(n-i)))=forvec(d=vector(n,i,-[9,1]),isprime(d*u)&&return(d*u),2) \\ M. F. Hasler, May 03 2017

A071363 Largest n-digit prime with strictly increasing digits.

Original entry on oeis.org

7, 89, 569, 5689, 34679, 345689, 1456789, 23456789
Offset: 1

Views

Author

Rick L. Shepherd, May 21 2002

Keywords

Comments

Notice the terms with consecutive digits; search for 23456789 to find several related sequences including A006055, A052017 and A052077.

Examples

			a(1) = A052015(4), a(2) = A052015(15), a(3) = A052015(35), a(4) = A052015(61), ... In short, a(n) = A052015(b(n)) with b = (4, 15, 35, 61, 81, 94, 98, 100). - _M. F. Hasler_, May 03 2017
		

Crossrefs

Subsequence of A052015.

Programs

  • PARI
    A071363(n,u=vectorv(n,i,10^(n-i)))={forvec(d=vector(n,i,[1,9]),isprime(d*u)&&n=d*u,2);n} \\ M. F. Hasler, May 03 2017

A108471 Smallest prime with a run of n strictly increasing digits.

Original entry on oeis.org

2, 13, 127, 1237, 12347, 123457, 1234789, 12356789, 1234567891, 100123456789
Offset: 1

Views

Author

Rick L. Shepherd, Jun 04 2005

Keywords

Comments

Terms here are never considered to have leading zeros. This sequence contains A071362. a(9) = A053546(9). a(10) = A104801(1) = 10 with 0123456789 appended.

Crossrefs

Showing 1-6 of 6 results.