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.

A088104 Smallest n-digit prime beginning with prime(n), or 0 if no such prime exists.

Original entry on oeis.org

2, 31, 503, 7001, 11003, 130003, 1700021, 19000013, 230000003, 2900000017, 31000000027, 370000000003, 4100000000003, 43000000000063, 470000000000023, 5300000000000129, 59000000000000011, 610000000000000031, 6700000000000000021, 71000000000000000047, 730000000000000000001
Offset: 1

Views

Author

Amarnath Murthy, Sep 24 2003

Keywords

Comments

Conjecture: No term is zero. Subsidiary sequences: (1) A088754 = number of n-digit primes beginning with prime(n). (2) A088755 = number of n-digit primes beginning with n.
If Legendre's conjecture is true, then no term is zero. - Chai Wah Wu, Jun 18 2019

Examples

			a(6) = 130003 begins with prime(6) = 13 and has 6 digits.
		

Crossrefs

Programs

  • Mathematica
    Prepend[NextPrime[FromDigits[PadRight[IntegerDigits[#],PrimePi[#]]]]&/@Prime[Range[2,25]],2]  (* Harvey P. Dale, Jan 09 2011 *)
  • PARI
    a(n) = my(p=prime(n), d=digits(p)); c=nextprime(p*10^(n-#d)); cd=digits(c); if(vector(#d, i, cd[i]) == d, return(c), return(0)) \\ David A. Corneth, Apr 13 2019
    
  • Python
    from sympy import prime, nextprime
    def A088104(n):
        p = prime(n)
        return nextprime(p*10**(n-len(str(p)))-1) # Chai Wah Wu, Jun 18 2019

Extensions

More terms from Ray Chandler, Oct 15 2003
More terms from David A. Corneth, Apr 13 2019