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.

A109611 Chen primes: primes p such that p + 2 is either a prime or a semiprime.

This page as a plain text file.
%I A109611 #84 Feb 16 2025 08:32:58
%S A109611 2,3,5,7,11,13,17,19,23,29,31,37,41,47,53,59,67,71,83,89,101,107,109,
%T A109611 113,127,131,137,139,149,157,167,179,181,191,197,199,211,227,233,239,
%U A109611 251,257,263,269,281,293,307,311,317,337,347,353,359,379,389,401,409
%N A109611 Chen primes: primes p such that p + 2 is either a prime or a semiprime.
%C A109611 43 is the first prime which is not a member (see A102540).
%C A109611 Contains A001359 = lesser of twin primes.
%C A109611 A063637 is a subsequence. - _Reinhard Zumkeller_, Mar 22 2010
%C A109611 In 1966 Chen proved that this sequence is infinite; his proof did not appear until 1973 due to the Cultural Revolution. - _Charles R Greathouse IV_, Jul 12 2016
%C A109611 Primes p such that p + 2 is a term of A037143. - _Flávio V. Fernandes_, May 08 2021
%C A109611 Named after the Chinese mathematician Chen Jingrun (1933-1996). - _Amiram Eldar_, Jun 10 2021
%H A109611 R. J. Mathar, <a href="/A109611/b109611.txt">Table of n, a(n) for n = 1..34076</a>
%H A109611 Jing Run Chen, <a href="https://doi.org/10.1142/9789814542487_0019">On the representation of a larger even integer as the sum of a prime and the product of at most two primes</a>, Sci. Sinica 16 (1973), pp. 157-176.
%H A109611 Ben Green and Terence Tao, <a href="http://arXiv.org/abs/math/0405581">Restriction theory of the Selberg sieve, with applications</a>, arXiv:math/0405581 [math.NT], 2004-2005, pp. 5, 14, 18-19, 21.
%H A109611 Ben Green and Terence Tao, <a href="http://dx.doi.org/10.5802/jtnb.538">Restriction theory of the Selberg sieve, with applications</a>, J. Théor. Nombres Bordeaux, Vol. 18, No. 1 (2006), pp. 147-182.
%H A109611 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ChensTheorem.html">Chen's Theorem</a>.
%H A109611 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ChenPrime.html">Chen Prime</a>.
%H A109611 Wikipedia, <a href="http://en.wikipedia.org/wiki/Chen_prime">Chen prime</a>.
%H A109611 Binbin Zhou, <a href="http://dx.doi.org/10.4064%2Faa138-4-1">The Chen primes contain arbitrarily long arithmetic progressions</a>, Acta Arithmetica, Vol. 138 (2009), pp. 301-315.
%F A109611 a(n)+2 = A139690(n).
%F A109611 Sum_{n>=1} 1/a(n) converges (Zhou, 2009). - _Amiram Eldar_, Jun 10 2021
%e A109611 a(4) = 7 because 7 + 2 = 9 and 9 is a semiprime.
%e A109611 a(5) = 11 because 11 + 2 = 13, a prime.
%p A109611 A109611 := proc(n)
%p A109611     option remember;
%p A109611     if n =1 then
%p A109611         2;
%p A109611     else
%p A109611         a := nextprime(procname(n-1)) ;
%p A109611         while true do
%p A109611             if isprime(a+2) or numtheory[bigomega](a+2) = 2 then
%p A109611                 return a;
%p A109611             end if;
%p A109611             a := nextprime(a) ;
%p A109611         end do:
%p A109611     end if;
%p A109611 end proc: # _R. J. Mathar_, Apr 26 2013
%t A109611 semiPrimeQ[x_] := TrueQ[Plus @@ Last /@ FactorInteger[ x ] == 2]; Select[Prime[Range[100]], PrimeQ[ # + 2] || semiPrimeQ[ # + 2] &] (* _Alonso del Arte_, Aug 08 2005 *)
%t A109611 SequencePosition[PrimeOmega[Range[500]], {1, _, 1|2}][[All, 1]] (* _Jean-François Alcover_, Feb 10 2018 *)
%o A109611 (PARI) isA001358(n)= if( bigomega(n)==2, return(1), return(0) );
%o A109611 isA109611(n)={ if( ! isprime(n), return(0), if( isprime(n+2), return(1), return( isA001358(n+2)) ); ); }
%o A109611 { n=1; for(i=1,90000, p=prime(i); if( isA109611(p), print(n," ",p); n++; ); ); } \\ _R. J. Mathar_, Aug 20 2006
%o A109611 (PARI) list(lim)=my(v=List([2]),semi=List(),L=lim+2,p=3); forprime(q=3,L\3, forprime(r=3,min(L\q,q), listput(semi,q*r))); semi=Set(semi); forprime(q=7,lim, if(setsearch(semi,q+2), listput(v,q))); forprime(q=5,L, if(q-p==2, listput(v,p)); p=q); Set(v) \\ _Charles R Greathouse IV_, Aug 25 2017
%o A109611 (Python)
%o A109611 from sympy import isprime, primeomega
%o A109611 def ok(n): return isprime(n) and (primeomega(n+2) < 3)
%o A109611 print(list(filter(ok, range(1, 410)))) # _Michael S. Branicky_, May 08 2021
%Y A109611 Union of A001359 and A063637.
%Y A109611 Cf. A001358, A112021, A112022, A139689, A269256.
%Y A109611 Cf. A037143.
%K A109611 nonn
%O A109611 1,1
%A A109611 _Paul Muljadi_, Jul 31 2005
%E A109611 Corrected by _Alonso del Arte_, Aug 08 2005