OFFSET
1,1
COMMENTS
At least one of p - k and p + k must be composite for each k in for k = 1..5.
Proof: If k = 3 then p - k and p + k are even. If k isn't three then exactly one of p - k, p and p + k is divisible by 3. QED. - David A. Corneth, Jan 18 2019
EXAMPLE
For p = 2131991 is in the sequence because for k=1, p - 1 = 2*5*7*7*9*229 and p + 1 = 2*2*2*3*3*29611 are both 6-almost primes, for k=2, p - 2 = 3*710663 and p + 2 = 29*73517 are both semiprimes, etc.
PROG
(PARI) upto(n) = {my(res = List(), q = 5); forprime(p = 7, n, t = 1; for(m = 1, 2, for(i = 0, 2, if(bigomega(p + 2*i + m) != bigomega(p - 2*i - m), t = 0; next(2) ) ) ); if(t == 1, listput(res, p)); q = p; ); res } \\ David A. Corneth, Jan 17 2019
(PARI) is(n) = if(!isprime(n) || n < 7, return(0)); for(k = 1, 6, if(bigomega(n + k) != bigomega(n - k), return(0))); 1 \\ David A. Corneth, Jan 17 2019
(Perl) use ntheory ':all'; for (my($p, $k)=(2, 6); $p <= 10**7; $p = next_prime($p)) { print "$p\n" if vecall {factor($p-$_) == factor($p+$_)} 1..$k } # Daniel Suteu, Jan 17 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Jan 16 2019
EXTENSIONS
a(23)-a(27) from David A. Corneth, Jan 17 2019
STATUS
approved