OFFSET
1,1
COMMENTS
Most terms == 0 (mod 6), but there are terms such as 7 and 15585 where p = 2, and
884 and 10010 where p = 3.
Conjecture: the sequence includes all sufficiently large k such that both k and A001414(k) are divisible by 6.
LINKS
Robert Israel, Table of n, a(n) for n = 1..828
EXAMPLE
a(5) = 186 is a term because p = 89 and q = 97 are primes with 89 + 97 = 186, 186 = 2*3*31 so A001414(186) = 2+3+31 = 36, and 89*97 + 186 = 8819, 89*97 - 186 = 8447, 89*97 + 36 = 8669 and 89*97 - 36 = 8597 are all primes.
MAPLE
spf:= proc(n) local t; add(t[1]*t[2], t=ifactors(n)[2]) end proc:
filter:= proc(k) local p, q, pq, s;
s:= spf(k);
if k::odd then
q:= k-2;
return (s::odd and isprime(q) and isprime(2*q+s) and isprime(2*q-s) and isprime(2*q+k) and isprime(2*q-k))
fi;
if k mod 6 <> 0 then
q:= k-3;
return (isprime(q) and isprime(3*q+s) and isprime(3*q-s) and isprime(3*q+k) and isprime(3*q-k))
fi;
p:= 2;
do
p:= nextprime(p);
q:= k-p;
if p > q then return false fi;
pq:= p*q;
if isprime(q) and isprime(pq+k) and isprime(pq-k) and isprime(pq+s) and isprime(pq-s) then return true fi
od
end proc:
select(filter, [$1..10000]);
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Oct 31 2022
STATUS
approved