OFFSET
1,1
COMMENTS
The following heuristic argument suggests that a(n) exists for all n: For large (random) k and a specific j <= n, the probability that both j*k - 1 and j*k + 1 are prime should be of the order 1/(log k)^2 (a slight twist of the first Hardy-Littlewood conjecture). Assuming independence between different j, the probability that this holds for 1 <= j <= n is of the order 1/(log k)^(2*n). Since the sum over k of 1/(log k)^(2*n) diverges, this should hold for infinitely many k by the second Borel-Cantelli lemma (assuming independence between different k).
LINKS
EXAMPLE
PROG
(Python)
from sympy import isprime, nextprime
def A348348(n):
p = 2
while 1:
p_next = nextprime(p)
if p_next == p+2 and all(isprime(j*(p+1)-1) and isprime(j*(p+1)+1) for j in range(2, n+1)):
return p+1
p = p_next
(PARI) isok(k, n) = for (j=1, n, if (!isprime(j*k-1) || !isprime(j*k+1), return(0))); return(1);
a(n) = my(k=1); while (!isok(k, n), k++); k; \\ Michel Marcus, Jul 01 2022
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Pontus von Brömssen, Oct 13 2021
EXTENSIONS
a(5), a(6) from Jon E. Schoenfield, Nov 14 2021
a(7) from Klaus Muuss, Jul 01 2022
STATUS
approved