cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A117242 Chen primes that are not twin primes.

Original entry on oeis.org

2, 23, 37, 47, 53, 67, 83, 89, 113, 127, 131, 157, 167, 211, 233, 251, 257, 263, 293, 307, 317, 337, 353, 359, 379, 389, 401, 409, 443, 449, 467, 479, 487, 491, 499, 503, 509, 541, 557, 563, 577, 587, 631, 647, 653, 677, 683, 701, 719, 743, 751, 761, 769, 787, 797, 839, 863, 877, 887, 911, 919, 937, 941, 947, 953, 971, 977, 983, 991
Offset: 1

Views

Author

Jani Melik, Apr 22 2006

Keywords

Examples

			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.
		

Crossrefs

Programs

  • 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 *)
  • PARI
    is(n)=isprime(n)&&bigomega(n+2)==2&&!isprime(n-2) \\ Charles R Greathouse IV, May 04 2013