OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 2, 2 is a Chen prime but is not in a twin prime pair.
a(2) = 23 is a Chen prime, but is not in a twin prime pair.
MAPLE
ischenprime:=proc(n); if (isprime(n) = 'true') then if (isprime(n+2) = 'true' or numtheory[bigomega](n+2) = 2) then RETURN('true') else RETURN('false') fi fi end:
ts_chen_non_twin_primes:=proc(n) local i, ans; ans:=[ ]: for i from 1 to n do if (ischenprime(i) = 'true') and (isprime(i+2) = 'false' and isprime(i-2) = 'false') then ans:=[op(ans), i]: fi od; RETURN(ans) end:
ts_chen_non_twin_primes(1000);
MATHEMATICA
Lim=PrimePi[1000]; Select[Select[Prime[Range[Lim]], PrimeOmega[#+2]<3&], !MemberQ[Select[ Prime[ Range[Lim]], PrimeQ[ # - 2]||PrimeQ[#+2]&] , #]&] (* James C. McMahon, Sep 27 2024 *)
PROG
(PARI) is(n)=isprime(n)&&bigomega(n+2)==2&&!isprime(n-2) \\ Charles R Greathouse IV, May 04 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Jani Melik, Apr 22 2006
STATUS
approved