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 18 results. Next

A063637 Primes p such that p+2 is a semiprime.

Original entry on oeis.org

2, 7, 13, 19, 23, 31, 37, 47, 53, 67, 83, 89, 109, 113, 127, 131, 139, 157, 167, 181, 199, 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, 571, 577, 587, 631, 647, 653, 677
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2001

Keywords

Comments

Primes of the form p*q - 2, where p and q are primes.
Union of A049002 and A115093. - T. D. Noe, Mar 01 2006

Examples

			From _K. D. Bajpai_, Sep 06 2014: (Start)
a(3) = 13, which is prime, and 13 + 2 = 15 = 3 * 5, which is a semiprime.
a(4) = 19, which is prime, and 19 + 2 = 21 = 3 * 7, which is a semiprime.
(End)
		

References

  • J.-R. Chen, On the representation of a large even integer as the sum of a prime and a product of at most two primes, Sci. Sinica 16 (1973), 157-176.

Crossrefs

Cf. A109611 (Chen primes).

Programs

  • Haskell
    a063637 n = a063637_list !!(n-1)
    a063637_list = filter ((== 1) . a064911 . (+ 2)) a000040_list
    -- Reinhard Zumkeller, Nov 15 2011
  • Maple
    select(t -> isprime(t) and numtheory:-bigomega(t+2)=2, [2, seq(2*i+1,i=1..500)]); # Robert Israel, Sep 07 2014
  • Mathematica
    f[n_] := Plus @@ Flatten[ Table[ # [[2]], {1}] & /@ FactorInteger[ n]]; Select[ Prime[ Range[ 123]], f[ # + 2] == 2 &] (* Robert G. Wilson v, Apr 30 2005 *)
    Select[Prime[Range[500]],PrimeOmega[#+2]==2&]  (* K. D. Bajpai, Sep 06 2014 *)
  • PARI
    { n=0; for (m=1, 10^9, p=prime(m); if (bigomega(p + 2) == 2, write("b063637.txt", n++, " ", p); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 26 2009
    

Formula

a(n) = A062721(n) - 2.
A010051(a(n)) * A064911(a(n) + 2) = 1. - Reinhard Zumkeller, Nov 15 2011

A063643 Primes with 2 representations: p*q - 2 = u*v + 2 where p, q, u and v are primes.

Original entry on oeis.org

23, 37, 53, 67, 89, 113, 131, 157, 211, 251, 293, 307, 337, 379, 409, 449, 487, 491, 499, 503, 631, 683, 701, 719, 751, 769, 787, 919, 941, 953, 991, 1009, 1039, 1117, 1193, 1201, 1259, 1381, 1399, 1439, 1459, 1471, 1499, 1511, 1567, 1709, 1733, 1759, 1801
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2001

Keywords

Comments

Or, primes p such that p+/-2 are semiprimes. - Zak Seidov, Mar 08 2006

Examples

			A063643(25) = 751: 751 = A063637(60)= 753 - 2 = 3*251 - 2, 751 = A063638(55)= 749 + 2 = 7*107 + 2.
		

Crossrefs

Cf. A109611 (Chen primes).

Programs

  • Maple
    q:= p-> isprime(p) and map(numtheory[bigomega], {p-2, p+2})={2}:
    select(q, [$2..2000])[];  # Alois P. Heinz, Apr 01 2024
  • Mathematica
    Select[Prime[Range[300]], PrimeOmega[#+2] == PrimeOmega[#-2] == 2&] (* Jean-François Alcover, Mar 02 2019 *)
  • PARI
    { n=0; for (m=2, 10^9, p=prime(m); if (bigomega(p + 2) == 2 && bigomega(p - 2) == 2, write("b063643.txt", n++, " ", p); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 26 2009

Formula

Intersection of A063637 and A063638. - Zak Seidov, Mar 14 2011

A189827 a(n) = d(n-1) + d(n+1), where d(k) is the number of divisors of k.

Original entry on oeis.org

3, 5, 4, 7, 4, 8, 5, 8, 5, 10, 4, 10, 6, 9, 6, 11, 4, 12, 6, 10, 6, 12, 5, 12, 7, 10, 6, 14, 4, 14, 6, 10, 8, 13, 6, 13, 6, 12, 6, 16, 4, 14, 8, 10, 8, 14, 5, 16, 7, 12, 6, 14, 6, 16, 8, 12, 6, 16, 4, 16, 8, 11, 10, 15, 6, 14, 6, 14, 6, 20, 4, 16, 8, 10, 10
Offset: 2

Views

Author

T. D. Noe, Apr 28 2011

Keywords

Comments

d(n-1) + d(n+1) is a measure of the compositeness of the numbers next to n. Sequence A189825 lists the first occurrence of each number.
It is conjectured that every number greater than 3 occurs an infinite number of times. Note that an infinite number of 4's is equivalent to there being an infinite number of twin primes (A001097). An infinite number of 5's is equivalent to there being an infinite number of primes of the form p^2-2 (A028871) or p^2+2 (A056899) for prime p. An infinite number of 6's is equivalent to there being an infinite number of primes of the form p^3-2 (A066878), p^3+2 (A048636), p*q-2 (A063637), or p*q+2 (A063638), where p and q are distinct primes.

Examples

			a(5) = d(4) + d(6) = 3 + 4 = 7.
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSigma[0,n-1] + DivisorSigma[0,n+1], {n, 2, 100}]
    First[#]+Last[#]&/@Partition[DivisorSigma[0,Range[80]],3,1] (* Harvey P. Dale, May 27 2013 *)

A176229 The smaller members p of cousin prime pairs (p,p+4) with a semiprime arithmetic mean p+2.

Original entry on oeis.org

7, 13, 19, 37, 67, 109, 127, 307, 379, 487, 499, 769, 877, 937, 1009, 1297, 1567, 2269, 2389, 2659, 2857, 3037, 3187, 3457, 3847, 3907, 3919, 4447, 4789, 4969, 4999, 5077, 5167, 5347, 5737, 6007, 6997, 7039, 7669, 8689, 8779, 9199, 10597, 11467, 11827
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Apr 12 2010

Keywords

Comments

By definition a subsequence of A063637 and of A023200.
The associated p+4 are members of A063638.
Because all members of A023200 are == 1 (mod 3), the semiprimes p+2 are all == 0 (mod 3), so one of their two factors is 3.
The least-significant digit (LSD) of p > 13 in A023200 is always 3, 7 or 9, but those with LSD equal to 3 demand p+2 to have LSD 5 and therefore divisor 5 which contradicts the semiprime property above, so 13 is the only member of the sequence with LSD equal to 3.

Examples

			7 = prime(4), 11 = prime(5), (7+11)/2 = 3^2 = semiprime(3), so 7 is in the sequence.
13 = prime(6), 17 = prime(7), (13+17)/3 = 3 * 5 = semiprime(6), so 13 is in the sequence.
19 = prime(8), 23 = prime(9), (19+23)/3 = 3 * 7 = semiprime(7), so 19 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    aQ[n_] := PrimeQ[n] && PrimeOmega[n + 2] == 2 && PrimeQ[n + 4]; Select[Range[12000], aQ] (* Amiram Eldar, Sep 08 2019 *)
    Select[Prime[Range[1500]],PrimeQ[#+4]&&PrimeOmega[#+2]==2&] (* Harvey P. Dale, May 15 2023 *)

A241659 Primes p such that p^3 + 2 is semiprime.

Original entry on oeis.org

2, 11, 13, 17, 19, 23, 31, 41, 53, 59, 89, 101, 131, 137, 149, 193, 211, 223, 227, 229, 233, 239, 251, 271, 293, 317, 331, 359, 401, 449, 461, 557, 563, 571, 593, 599, 619, 641, 659, 677, 691, 719, 739, 751, 809, 821, 853, 929, 971, 991, 1009, 1013, 1039, 1051
Offset: 1

Views

Author

K. D. Bajpai, Apr 26 2014

Keywords

Examples

			11 is prime and appears in the sequence because 11^3 + 2 = 1333 = 31 * 43, which is a semiprime.
17 is prime and appears in the sequence because 17^3 + 2 = 4915 =  5 * 983, which is a semiprime.
37 is prime but does not appear in the sequence because 37^3 + 2 = 50655 =  3 * 5 * 11 * 983, which is not a semiprime.
		

Crossrefs

Programs

  • Maple
    with(numtheory): KD:= proc() local a, b, k; k:=ithprime(n); a:=bigomega(k^3+2); if a=2 then RETURN (k); fi; end: seq(KD(), n=1..500);
  • Mathematica
    A241659 = {}; Do[t = Prime[n]; If[PrimeOmega[t^3 + 2] == 2, AppendTo[A241659, t]], {n, 500}]; A241659
    (*For the b-file*) c = 0; Do[t = Prime[n]; If[PrimeOmega[t^3 + 2] == 2, c++; Print[c, "  ", t]], {n, 1,6*10^4}];
    Select[Prime[Range[200]],PrimeOmega[#^3+2]==2&] (* Harvey P. Dale, Feb 05 2025 *)
  • PARI
    s=[]; forprime(p=2, 1200, if(bigomega(p^3+2)==2, s=concat(s, p))); s \\ Colin Barker, Apr 27 2014

A241809 Semiprimes sp such that sp+2 is a prime.

Original entry on oeis.org

9, 15, 21, 35, 39, 51, 57, 65, 69, 77, 87, 95, 111, 129, 155, 161, 177, 209, 221, 237, 249, 267, 291, 305, 309, 329, 335, 365, 371, 377, 381, 395, 407, 417, 437, 447, 485, 489, 497, 501, 519, 545, 591, 597, 611, 629, 671, 681, 689, 699, 707, 717, 731, 737, 749
Offset: 1

Views

Author

K. D. Bajpai, Apr 29 2014

Keywords

Examples

			a(2) = 15 = 3*5, which is semiprime and 15+2 = 17 is a prime.
a(6) = 51 = 3*17, which is semiprime and 51+2 = 53 is a prime.
		

Crossrefs

Programs

  • Maple
    with(numtheory): A241809:= proc(); if bigomega(x)=2 and isprime(x+2)then  RETURN (x); fi; end: seq(A241809 (), x=1..2000);
  • Mathematica
    A241809={};Do[If[PrimeOmega[n]==2&&PrimeQ[n+2],AppendTo[A241809,n]],{n,1000}];A241809
    Select[Prime[Range[200]]-2,PrimeOmega[#]==2&] (* Harvey P. Dale, Aug 06 2015 *)
    SequencePosition[Table[Which[PrimeQ[n],1,PrimeOmega[n]==2,2,True,0],{n,800}],{2,,1}][[;;,1]] (* _Harvey P. Dale, Oct 05 2023 *)
  • PARI
    for(k=1, 1000, if(bigomega(k)==2 && isprime(k+2), print1(k, ", "))) \\ Colin Barker, May 07 2014

Formula

a(n) = A063638(n) - 2.

A092104 Primes of form p*q + 4, with prime p and q.

Original entry on oeis.org

13, 19, 29, 37, 43, 53, 59, 61, 73, 89, 97, 127, 137, 149, 163, 173, 181, 191, 223, 239, 241, 251, 257, 263, 269, 271, 293, 307, 313, 331, 359, 397, 419, 421, 431, 449, 457, 509, 521, 523, 541, 547, 557, 563, 569, 577, 587, 593, 601, 653, 659, 673, 683, 691
Offset: 1

Views

Author

Zak Seidov, Feb 20 2004

Keywords

Comments

Primes of form p*q + 2, A063638. Primes common in A063638 and A092104, A092105. Primes of form p*p + 4, A045637.

Crossrefs

Programs

  • Mathematica
    With[{upto=700},Select[Times@@#+4&/@Tuples[Prime[Range[PrimePi[upto/2]]], 2], PrimeQ[#]&&#<+upto&]]//Union (* Harvey P. Dale, Jul 23 2016 *)
  • PARI
    list(lim)=my(v=List(),t); forprime(p=3,(lim-4)\3, forprime(q=3,min((lim-4)\p, p), t=p*q+4; if(isprime(t), listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Aug 05 2016

A207526 Primes p such that p-2 or p+2 are semiprimes.

Original entry on oeis.org

2, 7, 11, 13, 17, 19, 23, 31, 37, 41, 47, 53, 59, 67, 71, 79, 83, 89, 97, 109, 113, 127, 131, 139, 157, 163, 167, 179, 181, 199, 211, 223, 233, 239, 251, 257, 263, 269, 293, 307, 311, 317, 331, 337, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 439
Offset: 1

Views

Author

Keywords

Examples

			2+2=2^2(semiprime), 7+2=3^2(semiprime), 11-2=3^2(semiprime), 13+2=3*5(semiprime), 17-2=3*5(semiprime)
		

Crossrefs

Programs

  • Mathematica
    Select[Table[Prime[n], {n,200}], (Last /@ FactorInteger[#-2] == {1,1} || Last /@ FactorInteger[#-2] == {2}) || (Last /@ FactorInteger[#+2] == {1,1} || Last /@ FactorInteger[#+2] == {2}) &]

A217195 Primes p such that p-2 is the greatest semiprime less than p.

Original entry on oeis.org

17, 37, 41, 53, 67, 71, 79, 89, 97, 113, 131, 157, 163, 211, 223, 239, 251, 269, 293, 307, 311, 331, 337, 367, 373, 379, 397, 409, 419, 439, 449, 487, 491, 499, 521, 547, 593, 599, 613, 631, 673, 683, 691, 701, 709, 733, 739, 751, 757, 769, 773, 787, 809
Offset: 1

Views

Author

Antonio Roldán, Sep 27 2012

Keywords

Comments

This is a subsequence of A063638.

Examples

			487 is prime, 486 = 2*3^5 is not semiprime and 485 = 5*97 is semiprime.
		

Programs

  • Mathematica
    SemiPrimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])]; Select[Prime[Range[200]], ! SemiPrimeQ[# - 1] && SemiPrimeQ[# - 2] &] (* T. D. Noe, Sep 27 2012 *)
  • PARI
    forprime(p=3, 9999, bigomega(p-2)==2 && bigomega(p-1)!=2 & print1(p", "))

A241716 Primes p such that p^3 - 2 is semiprime.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 41, 43, 47, 61, 79, 89, 101, 107, 139, 157, 181, 199, 239, 271, 307, 311, 331, 337, 347, 349, 379, 397, 409, 421, 431, 479, 487, 499, 521, 523, 541, 571, 607, 613, 641, 643, 661, 673, 701, 719, 761, 769, 811, 823, 829, 839, 877, 881, 883
Offset: 1

Views

Author

K. D. Bajpai, Apr 27 2014

Keywords

Examples

			11 is prime and appears in the sequence because 11^3 - 2 = 1329 = 3 * 443, which is a semiprime.
17 is prime and appears in the sequence because 17^3 - 2 = 4911 = 3 * 1637, which is a semiprime.
23 is prime but does not appear in the sequence because 23^3 - 2 = 12165 =  3 * 5 * 811, which is not a semiprime.
		

Crossrefs

Programs

  • Maple
    with(numtheory):A241716:= proc() local k; k:=ithprime(x); if bigomega(k^3-2)=2 then RETURN (k); fi; end: seq(A241716(), x=1..500);
  • Mathematica
    A241716 = {}; Do[t = Prime[n]; If[PrimeOmega[t^3 - 2] == 2, AppendTo[A241716, t]], {n, 500}]; A241716
    Select[Prime[Range[200]],PrimeOmega[#^3-2]==2&] (* Harvey P. Dale, Dec 09 2018 *)
Showing 1-10 of 18 results. Next