OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = 29 is a term because the values of k for which 29+k and 29-k are prime are 12, 18 and 24, and 19+2*(12+18+24) = 127 which is prime.
MAPLE
filter:= proc(n) local i;
isprime(n + 2*add(`if`(isprime(n+i) and isprime(n-i), i, 0), i=6..n-5, 6) + `if`(isprime(2*n - 3), 2*n-6, 0))
end proc:
select(filter, [seq(ithprime(i), i=1..1000)]);
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Feb 15 2021
STATUS
approved