login
A341599
Primes p such that p + 2*Sum({k > 0 : p+k and p-k are both prime}) is prime.
1
2, 3, 19, 29, 47, 59, 61, 73, 103, 109, 149, 173, 179, 199, 227, 271, 379, 383, 463, 467, 479, 499, 509, 541, 557, 593, 607, 673, 733, 761, 829, 947, 953, 1019, 1049, 1061, 1063, 1109, 1259, 1307, 1319, 1373, 1399, 1489, 1607, 1699, 1709, 1721, 1723, 1741, 1801, 1889, 1931, 1979, 1987, 2029, 2039
OFFSET
1,1
LINKS
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
Sequence in context: A215387 A140555 A196446 * A265799 A058912 A040145
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Feb 15 2021
STATUS
approved