login
A356741
a(n) is the least prime(m) such that prime(n) + prime(m)# is prime, where prime(m)# denotes the product of the first m primes, or -1 if no such prime(m) exists.
1
2, 2, 3, 2, 3, 2, 7, 3, 2, 3, 3, 2, 5, 3, 3, 2, 3, 3, 2, 3, 5, 3, 11, 3, 2, 3, 2, 5, 11, 5, 3, 2, 7, 2, 3, 3, 5, 3, 3, 2, 5, 2, 3, 2, 5, 5, 3, 2, 7, 3, 2, 5, 3, 3, 3, 2, 3, 3, 2, 5, 7, 3, 2, 7, 5, 3, 5, 2, 5, 3, 5, 3, 3, 5, 3, 5, 7, 5, 5, 2, 7, 2, 3, 11, 3, 5, 3
OFFSET
2,1
COMMENTS
Conjecture: Such a prime(m) exists for every n, i.e., a(n) is never -1 for n>1.
Conjecture: Limit_{N->oo} (Sum_{n=2..N} a(n)) / (Sum_{n=2..N} log(prime(n))) = C with C constant between 0.5 and 1 inclusive.
LINKS
FORMULA
a(n) = prime(A100380(n)). - Michel Marcus, Sep 12 2022
EXAMPLE
For n=4, prime(4)=7, and m=1 gives prime(m)=2 and prime(n) + prime(m)# = 7 + 2 = 9 (nonprime), but m=2 gives prime(m)=3 and prime(n) + prime(m)# = 7 + 2*3 = 13 (prime), so a(4) = prime(2) = 3.
PROG
(Python)
from sympy import isprime, nextprime, prime
def a(n):
pn, pm, pmsharp = prime(n), 2, 2
while not isprime(pn + pmsharp): pm = nextprime(pm); pmsharp *= pm
return pm
print([a(n) for n in range(2, 89)]) # Michael S. Branicky, Sep 04 2022
(PARI) a(n) = my(p=2, pr=2, pn=prime(n)); while (!isprime(pn+pr), p=nextprime(p+1); pr *= p); p; \\ Michel Marcus, Sep 05 2022
CROSSREFS
Sequence in context: A144910 A080330 A342905 * A152872 A350883 A072832
KEYWORD
nonn
AUTHOR
Alain Rocchelli, Sep 04 2022
STATUS
approved