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.

Showing 1-10 of 11 results. Next

A115606 Partial sums of A102540 (primes that are not Chen primes).

Original entry on oeis.org

0, 43, 104, 177, 256, 353, 456, 607, 770, 943, 1136, 1359, 1588, 1829, 2100, 2377, 2660, 2973, 3304, 3653, 4020, 4393, 4776, 5173, 5594, 6027, 6466, 6923, 7386, 7909, 8456, 9049, 9650, 10257, 10870, 11489, 12132, 12793, 13466, 14157, 14866, 15593
Offset: 0

Views

Author

Jonathan Vos Post, Mar 09 2006

Keywords

Comments

See also A109611 (Chen primes: primes p such that p + 2 is either a prime or a semiprime), A102540 (primes that are not Chen primes). a(n) is prime for a(1) = 43, a(5) = 353 [Chen prime], a(7) = 607, a(15) = 2377, a(31) = 9049, a(35) = 11489 [Chen prime], a(49) = 22013. a(n) is semiprime for a(3) = 177, a(9) = 943, a(13) = 1829, a(17) = 2973, a(19) = 3653, a(21) = 4393, a(23) = 5173, a(24) = 5594, a(29) = 7909, a(37) = 12793, a(38) = 13466, a(40) = 14866, a(41) = 15593, a(43) = 17065, a(45) = 18595.

Examples

			a(5) = 43 + 61 + 73 + 79 + 97 = 353, which happens to be the Chen prime A109611(52).
		

Crossrefs

Formula

a(n) = SUM[k=1..n] A102540(k).

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

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 47, 53, 59, 67, 71, 83, 89, 101, 107, 109, 113, 127, 131, 137, 139, 149, 157, 167, 179, 181, 191, 197, 199, 211, 227, 233, 239, 251, 257, 263, 269, 281, 293, 307, 311, 317, 337, 347, 353, 359, 379, 389, 401, 409
Offset: 1

Views

Author

Paul Muljadi, Jul 31 2005

Keywords

Comments

43 is the first prime which is not a member (see A102540).
Contains A001359 = lesser of twin primes.
A063637 is a subsequence. - Reinhard Zumkeller, Mar 22 2010
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
Primes p such that p + 2 is a term of A037143. - Flávio V. Fernandes, May 08 2021
Named after the Chinese mathematician Chen Jingrun (1933-1996). - Amiram Eldar, Jun 10 2021

Examples

			a(4) = 7 because 7 + 2 = 9 and 9 is a semiprime.
a(5) = 11 because 11 + 2 = 13, a prime.
		

Crossrefs

Programs

  • Maple
    A109611 := proc(n)
        option remember;
        if n =1 then
            2;
        else
            a := nextprime(procname(n-1)) ;
            while true do
                if isprime(a+2) or numtheory[bigomega](a+2) = 2 then
                    return a;
                end if;
                a := nextprime(a) ;
            end do:
        end if;
    end proc: # R. J. Mathar, Apr 26 2013
  • Mathematica
    semiPrimeQ[x_] := TrueQ[Plus @@ Last /@ FactorInteger[ x ] == 2]; Select[Prime[Range[100]], PrimeQ[ # + 2] || semiPrimeQ[ # + 2] &] (* Alonso del Arte, Aug 08 2005 *)
    SequencePosition[PrimeOmega[Range[500]], {1, , 1|2}][[All, 1]] (* _Jean-François Alcover, Feb 10 2018 *)
  • PARI
    isA001358(n)= if( bigomega(n)==2, return(1), return(0) );
    isA109611(n)={ if( ! isprime(n), return(0), if( isprime(n+2), return(1), return( isA001358(n+2)) ); ); }
    { n=1; for(i=1,90000, p=prime(i); if( isA109611(p), print(n," ",p); n++; ); ); } \\ R. J. Mathar, Aug 20 2006
    
  • 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
    
  • Python
    from sympy import isprime, primeomega
    def ok(n): return isprime(n) and (primeomega(n+2) < 3)
    print(list(filter(ok, range(1, 410)))) # Michael S. Branicky, May 08 2021

Formula

a(n)+2 = A139690(n).
Sum_{n>=1} 1/a(n) converges (Zhou, 2009). - Amiram Eldar, Jun 10 2021

Extensions

Corrected by Alonso del Arte, Aug 08 2005

A118499 Numbers k such that the k-th prime number is not a Chen prime.

Original entry on oeis.org

14, 18, 21, 22, 25, 27, 36, 38, 40, 44, 48, 50, 53, 58, 59, 61, 65, 67, 70, 73, 74, 76, 78, 82, 84, 85, 88, 90, 99, 101, 108, 110, 111, 112, 114, 117, 121, 122, 125, 127, 129, 130, 131, 134, 137, 143, 147, 149, 153, 155, 158, 163, 168, 170
Offset: 1

Views

Author

Jani Melik, May 05 2006

Keywords

Examples

			97 is the 25th prime number but not a Chen prime since 99 = 3*3*11, therefore 25 is in the sequence.
		

Crossrefs

Programs

  • Maple
    ts_inde_nonchen:= proc(n) local i, ans, inde; ans:=[ ]: inde := 0; for i from 1 to n do if ( isprime(i) = 'true') then inde:=inde+1: if (isprime(i+2) = 'false' and numtheory[bigomega](i+2) <> 2) then ans:=[ op(ans), inde ] fi fi od: return ans end: ts_inde_nonchen(2000);
  • Mathematica
    Select[Range[180],Sum[FactorInteger[Prime[ # ]+2][[i,2]],{i,1,Length[ FactorInteger[Prime[ # ] + 2]]}] > 2 &]
  • PARI
    isok(k) = (bigomega(prime(k)+2) > 2); \\ Michel Marcus, Oct 19 2021

Extensions

Edited by Stefan Steinerberger, Jul 19 2007

A153167 Numbers n such that n+2 is not a Chen prime.

Original entry on oeis.org

2, 4, 6, 7, 8, 10, 12, 13, 14, 16, 18, 19, 20, 22, 23, 24, 25, 26, 28, 30, 31, 32, 33, 34, 36, 37, 38, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 88, 89, 90
Offset: 1

Views

Author

Vincenzo Librandi, Dec 20 2008

Keywords

Comments

Contains all strictly positive even numbers A005843.
For each odd k>1 we can accumulate the numbers == k^2-2 (mod 2k) in a row, the last entry equal to A073577(k):
7; (k=3)
13, 23; (k=5)
19, 33, 47; (k=7)
25, 43, 61, 79; (k=9)
31, 53, 75, 97, 119; (k=11)
7, 63, 89, 115, 141, 167; (k=13)
43, 73, 103, 133, 163, 193,223; (k=17)
49, 83, 17, 151,185, 219, 253, 287; (k=19)
Each element T of this table has the format T= k^2-2-j*2*k, so T+2 is of the form k*(k-2*j), therefore not prime, and consequently all elements T are in the sequence.

Crossrefs

Extensions

Edited, 41, 59 (see A102540) etc. inserted by R. J. Mathar, Oct 16 2009

A280010 Orders of consecutive clusters of non-Chen primes.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 2, 1, 1, 3, 1, 2, 1, 1, 1, 2
Offset: 1

Views

Author

Enrique Navarrete, Feb 21 2017

Keywords

Examples

			a(1)=1 since the first cluster consists of the single value p=43.
a(3)=2 since the third cluster consists of the consecutive non-Chen primes {73,79}.
		

Crossrefs

Programs

  • Mathematica
    Length /@ DeleteCases[Split@ Table[Boole@ Nand[# != 1, PrimeOmega@ # <= 2] &[# + 2] &@ Prime@ n, {n, 300}], k_ /; Total@ k == 0] (* Michael De Vlieger, Feb 27 2017 *)
  • PARI
    do(lim)=my(v=List(), u=v, r, s); forprime(p=2, lim\2, forprime(q=2, min(lim\p, p), listput(u, p*q))); u=Set(u); r=3; forprime(p=5, lim, if(p-r==2 || setsearch(u, r+2), if(s, listput(v, s); s=0), s++); r=p); u=0; Vec(v) \\ Charles R Greathouse IV, Feb 27 2017

A115719 Products of two primes that are not Chen primes.

Original entry on oeis.org

1849, 2623, 3139, 3397, 3721, 4171, 4429, 4453, 4819, 5329, 5767, 5917, 6241, 6283, 6493, 7009, 7081, 7439, 7519, 7663, 8137, 8299, 9211, 9409, 9589, 9847, 9943, 9991, 10363, 10553, 10609, 11023, 11653, 11773, 11899, 11911, 11929, 12169, 12629, 12877
Offset: 1

Views

Author

Jonathan Vos Post, Mar 09 2006

Keywords

Comments

Subset of semiprimes (A001358) such that neither prime factor is a Chen prime (A109611).

Examples

			a(1) = 1849 = A102540(1)*A102540(1) = 43*43.
a(2) = 2623 = A102540(1)*A102540(2) = 43*61.
a(36) = 14701 = A102540(2)*A102540(13) = 61 * 241.
		

Crossrefs

A118483 Partial sums of primes that are not Chen primes (starting with 1).

Original entry on oeis.org

1, 44, 105, 178, 257, 354, 457, 608, 771, 944, 1137, 1360, 1589, 1830, 2101, 2378, 2661, 2974, 3305, 3654, 4021, 4394, 4777, 5174, 5595, 6028, 6467, 6924, 7387, 7910, 8457, 9050, 9651, 10258, 10871, 11490, 12133, 12794, 13467, 14158, 14867, 15594
Offset: 0

Views

Author

Jani Melik, May 05 2006

Keywords

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_partsum_notchenprime:=proc(n) local i,ans,tren; ans:=1: tren:=1: for i from 1 to n do if (ischenprime(i)='false') then tren := tren+i: ans:=[op(ans), tren]: fi od; RETURN(ans) end: ts_partsum_notchenprime(1000);
  • Mathematica
    Accumulate[Join[{1},Select[Prime[Range[200]],PrimeOmega[#+2]>2&]]] (* Harvey P. Dale, Dec 14 2012 *)

A118491 Product of first n Chen primes.

Original entry on oeis.org

1, 2, 6, 30, 210, 2310, 30030, 510510, 9699690, 223092870, 6469693230, 200560490130, 7420738134810, 304250263527210, 14299762385778870, 757887406446280110, 44715356980330526490, 2995928917682145274830
Offset: 0

Views

Author

Jani Melik, May 05 2006

Keywords

Comments

This first differs from primorials A002110 at a(14) = 14299762385778870 = 47*a(13) rather than 43*a(13) because 43 is the smallest prime that is not a Chen prime (A102540). - Jonathan Vos Post, Dec 25 2008

Examples

			a(0) = 1 by definition. a(1) = 2, 2 is first Chen prime, a(2) = 6 since it is the product of the first two Chen primes 2 and 3, ...
		

Crossrefs

Cf. A102540. - Jonathan Vos Post, Dec 25 2008

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_prim_numbers:=proc(n) local i,ans,tren; ans:=[1]: tren:=1: for i from 1 to n do if (ischenprime(i) = 'true') then tren := i*tren: ans:=[op(ans), tren]: fi od; RETURN(ans) end: ts_chen_prim_numbers(140);
  • Mathematica
    FoldList[Times,Join[{1},Select[Prime[Range[50]],PrimeOmega[#+2]<3&]]] (* Harvey P. Dale, Jun 06 2022 *)

A118497 Primes that are not Chen primes written backwards.

Original entry on oeis.org

34, 16, 37, 97, 79, 301, 151, 361, 371, 391, 322, 922, 142, 172, 772, 382, 313, 133, 943, 763, 373, 383, 793, 124, 334, 934, 754, 364, 325, 745, 395, 106, 706, 316, 916, 346, 166, 376, 196, 907, 727, 337, 937, 757, 377, 328, 358, 958, 388, 709, 929, 769, 799
Offset: 1

Views

Author

Jani Melik, May 05 2006

Keywords

Crossrefs

Programs

  • Maple
    # Check if number is Chen prime 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: #Reverse digits obrni_stev:=proc(n) local i, tren, tren1, st, ans; ans:=[ ]: tren:=n: tren1:=0: for i while (tren>0) do st:=round(10*frac(tren/10)): ans:=[op(ans), st]: tren:=trunc(tren/10): od: for i from 0 to nops(ans)-1 do tren1:= tren1 + op(nops(ans)-i, ans)*10^(i): od: return tren1 end: ts_inv_nonchen_pra:= proc(n) local i, trens, ans; trens:= [ ]; ans:=[ ]; for i from 1 to n do if (ischenprime( i ) = 'false') then ans:=[op(ans),obrni_stev(i)] fi: od: return ans end: ts_inv_nonchen_pra(2000);

A321420 Primes p whose reversal is a Chen prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 31, 71, 73, 101, 107, 113, 131, 149, 157, 167, 179, 181, 191, 199, 311, 347, 353, 359, 389, 701, 733, 739, 743, 751, 761, 787, 797, 919, 941, 953, 967, 971, 983, 991, 1009, 1021, 1031, 1061, 1091, 1097, 1103, 1109, 1151, 1153, 1217, 1223
Offset: 1

Views

Author

Paolo Galliani, Nov 09 2018

Keywords

Comments

73 is the smallest non-Chen prime whose reversal is a Chen prime.

Examples

			73 is in the sequence because its reversal is 37 which is a Chen prime (because 37 + 2 = 39 has at most two prime factors).
		

Crossrefs

Programs

  • Mathematica
    cpQ[n_] := Module[{rev = FromDigits[Reverse[IntegerDigits[n]]]}, PrimeQ[rev] && PrimeOmega[rev + 2] < 3]; Select[Prime[Range[400]], cpQ] (* Amiram Eldar, Nov 09 2018 after Harvey P. Dale at A118725 *)
  • PARI
    is(n) = if(isprime(n), rn = fromdigits(Vecrev(digits(n))); return(isprime(rn) && bigomega(rn+2) <= 2), 0) \\ David A. Corneth, Nov 09 2018
Showing 1-10 of 11 results. Next