OFFSET
2,1
COMMENTS
a(10) <= 311346179693.
a(11) = 2794997.
a(18) > 7*10^12, a(19) = 1040573169683. - Giovanni Resta, Mar 08 2020
EXAMPLE
a(3) = 47 is prime; 47-3 = 44 = 2^2*11 and 47+3 = 50 = 2*5^2 both have 3 prime divisors with multiplicity.
MAPLE
f:= proc(n) local k;
for k from n+1+(n mod 2) by 2 to 3*10^6+1 do
if isprime(k) and numtheory:-bigomega(k-n)=n and
numtheory:-bigomega(k+n)=n then return k
fi od;
FAIL
end proc:
map(f, [$2..7]);
MATHEMATICA
Table[SelectFirst[Prime@ Range@ 2000000, PrimeOmega[#-n] == n && PrimeOmega[#+n] == n &], {n, 2, 8}] (* Robert Price, Sep 16 2020 *)
PROG
(PARI) a(n) = forprime(p=n+1, oo, if(bigomega(p-n)==n && bigomega(p+n)==n, return(p))); \\ Jinyuan Wang, Mar 08 2020
CROSSREFS
KEYWORD
nonn,more
AUTHOR
J. M. Bergot and Robert Israel, Mar 07 2020
EXTENSIONS
a(8)-a(9) from Jinyuan Wang, Mar 08 2020
a(10)-a(17) from Giovanni Resta, Mar 08 2020
STATUS
approved