|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|