OFFSET
0,1
COMMENTS
a(n) = prime(k) for the least k such that prime(k)+2*prime(k+j) and prime(k)+2*prime(k-j) are both prime for j = n but not both prime for j = 1 ... n-1.
LINKS
Robert Israel, Table of n, a(n) for n = 0..1000
MAPLE
nP:= 10000: Primes:= [seq(ithprime(i), i=1..nP)]: R:= 2: found:= true:
for n from 1 to 300 while found do
found:= false;
for k from n+1 to nP-n do
if isprime(Primes[k]+2*Primes[k-n]) and isprime(Primes[k]+2*Primes[k+n]) and
andmap(t -> not isprime(Primes[k]+2*Primes[k-t]) or not
isprime(Primes[k]+2*Primes[k+t]), [$1..n-1]) then
R:= R, Primes[k]; found:= true; break
fi
od od:
R;
PROG
(PARI) f(n) = for (k=1, n-1, my(p=prime(n)); if (isprime(p + 2*prime(n-k)) && isprime(p + 2*prime(n+k)), return(k))); return(0); \\ A351692
a(n) = my(k=1); while (f(k) != n, k++); prime(k); \\ Michel Marcus, May 11 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, May 05 2022
STATUS
approved