OFFSET
1,1
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
LINKS
David A. Corneth, Table of n, a(n) for n = 1..723
EXAMPLE
a(6) = 130003 begins with prime(6) = 13 and has 6 digits.
MATHEMATICA
Prepend[NextPrime[FromDigits[PadRight[IntegerDigits[#], PrimePi[#]]]]&/@Prime[Range[2, 25]], 2] (* Harvey P. Dale, Jan 09 2011 *)
PROG
(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
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Sep 24 2003
EXTENSIONS
More terms from Ray Chandler, Oct 15 2003
More terms from David A. Corneth, Apr 13 2019
STATUS
approved