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.

A139053 Array read by rows: row n lists the first 3 primes with n digits.

Original entry on oeis.org

2, 3, 5, 11, 13, 17, 101, 103, 107, 1009, 1013, 1019, 10007, 10009, 10037, 100003, 100019, 100043, 1000003, 1000033, 1000037, 10000019, 10000079, 10000103, 100000007, 100000037, 100000039, 1000000007, 1000000009, 1000000021, 10000000019, 10000000033, 10000000061
Offset: 1

Views

Author

Omar E. Pol, Apr 08 2008

Keywords

Crossrefs

Programs

  • Mathematica
    np[n_]:=Module[{a=NextPrime[10^n]},{a,NextPrime[a], NextPrime[NextPrime[ a]]}]; Flatten[Array[np,12,0]] (* Harvey P. Dale, Dec 14 2011 *)
    Flatten@Array[NextPrime[10^#,{1,2,3}]&,12,0] (* Giorgos Kalogeropoulos, May 06 2019 *)
  • Python
    from sympy import nextprime
    def auptodigs(maxdigits):
      alst = []
      for n in range(1, maxdigits+1):
        p1 = nextprime(10**(n-1))
        p2 = nextprime(p1)
        p3 = nextprime(p2)
        alst.extend([p1, p2, p3])
      return alst
    print(auptodigs(11)) # Michael S. Branicky, May 07 2021

Extensions

More terms from Max Alekseyev, Dec 12 2011
a(32) and beyond from Michael S. Branicky, May 07 2021