login
A055785
a(n) = smallest prime q of form q=-1+(p+1)*10^w, where p is n-th prime, or 0 if there is no such prime.
2
29, 0, 59, 79, 1199999, 139, 179, 199, 239, 2999, 319999999999999999999999999999, 379, 419, 439, 479, 5399, 599, 619, 679999, 719, 739, 79999, 839, 8999, 97999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
OFFSET
1,1
COMMENTS
Branicky searched n<=10000 to 1000 digits.
a(87) = 45*10^11959-1 (11961 digits). - Sidney Cadot, Jan 06 2023
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..86
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (with "None" if the solution is unknown, with each such value tested to at least 1000 digits).
EXAMPLE
25th term is 9799...999, i.e., digits of Prime[25]=97 are followed by 90 copies of digit 9.
PROG
(Python)
from sympy import isprime, prime
def a(n, wlimit=1000):
if n == 2: return 0
pn, w = str(prime(n)), 1
while not isprime(int(pn+"9"*w)):
w += 1
if w > wlimit: return -1
return int(pn+"9"*w)
print([a(n) for n in range(1, 26)]) # Michael S. Branicky, May 07 2022
CROSSREFS
Sequence in context: A067158 A243001 A092995 * A040847 A040848 A040849
KEYWORD
base,nonn
AUTHOR
Labos Elemer, Jul 13 2000
EXTENSIONS
Revised to handle p=3 by Sean A. Irvine, Apr 05 2022
STATUS
approved