login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A358128
a(n) is the least semiprime x such that x-2*n and x+2*n are prime.
2
9, 9, 25, 15, 21, 25, 33, 21, 25, 33, 25, 35, 33, 33, 49, 35, 39, 65, 51, 57, 55, 57, 51, 55, 57, 55, 77, 93, 69, 77, 65, 87, 85, 111, 87, 77, 77, 87, 85, 87, 85, 95, 93, 91, 121, 159, 177, 115, 129, 111, 121, 123, 123, 115, 123, 115, 119, 123, 121, 143, 129, 183, 143, 141, 133, 145, 177, 141, 143
OFFSET
1,1
COMMENTS
If n == 0 (mod 3) then a(n) == 1 or 5 (mod 6).
If n == 1 (mod 3) then a(n) == 3 or 5 (mod 6).
If n == 2 (mod 3) then a(n) == 1 or 3 (mod 6).
LINKS
EXAMPLE
a(3) = 25 because 25 = 5^2 is a semiprime and 25 - 2*3 = 19 and 25 + 2*3 = 31 are primes, and 25 is the least semiprime that works.
MAPLE
f:= proc(n) local p;
p:= 1:
do
p:= nextprime(p);
if isprime(p+4*n) and numtheory:-bigomega(p+2*n) = 2 then return p+2*n fi
od
end proc:
map(f, [$1..100]);
PROG
(PARI) a(n) = my(x=2*n+2); while ((bigomega(x)!=2) || !isprime(x-2*n) || !isprime(x+2*n), x++); x; \\ Michel Marcus, Oct 31 2022
CROSSREFS
Cf. A001358.
Sequence in context: A282269 A205380 A246035 * A147340 A147499 A146591
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Oct 30 2022
STATUS
approved