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

A105571 Numbers m such that m - 2 and m + 2 are semiprimes.

Original entry on oeis.org

8, 12, 23, 24, 36, 37, 53, 60, 67, 84, 89, 93, 113, 117, 120, 121, 131, 143, 144, 157, 185, 203, 204, 207, 211, 215, 216, 217, 219, 251, 276, 289, 293, 297, 300, 301, 303, 307, 321, 325, 337, 360, 363, 379, 384, 393, 396, 405, 409, 413, 415, 449, 456, 471, 480
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 14 2005

Keywords

Comments

A001222(a(n)-2) = A001222(a(n)+2) = 2.
The even members of the sequence are A054735. - Robert Israel, Jan 18 2015
The prime members of the sequence are A063643. - Michel Marcus, Mar 27 2015

Examples

			From _Jon E. Schoenfield_, Jan 18 2015: (Start)
12 - 2 = 10 = 2*5 and 12 + 2 = 14 = 2*7 so 12 is in the sequence.
23 - 2 = 21 = 3*7 and 23 + 2 = 25 = 5*5 so 23 is in the sequence.
16 - 2 = 14 = 2*7 but 16 + 2 = 18 = 2*3*3 so 16 is not in the sequence.
(End)
		

Crossrefs

Programs

  • Haskell
    a105571 n = a105571_list !! (n-1)
    a105571_list = [x | x <- [3..], a064911 (x - 2) == 1, a064911 (x + 2) == 1]
    -- Reinhard Zumkeller, Mar 31 2015
  • Magma
    IsSemiprime:=func< n | &+[k[2]: k in Factorization(n)] eq 2 >; [ n: n in [3..700] | IsSemiprime(n+2) and IsSemiprime(n-2) ]; // Vincenzo Librandi, Mar 30 2015
    
  • Maple
    select(n -> numtheory:-bigomega(n+2) = 2 and numtheory:-bigomega(n-2) = 2,
    [$1..1000]); # Robert Israel, Jan 18 2015
  • Mathematica
    q=2;lst={};Do[If[Plus@@Last/@FactorInteger[n-q]==q&&Plus@@Last/@FactorInteger[n+q]==q,AppendTo[lst,n]],{n,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Feb 01 2009 *)
    Select[Range[700], PrimeOmega[# + 2] == PrimeOmega[# - 2] == 2 &] (* Vincenzo Librandi, Mar 30 2015 *)

A117328 Primes p such that p +- 4 are semiprimes.

Original entry on oeis.org

29, 53, 61, 73, 89, 137, 173, 181, 263, 331, 449, 523, 541, 547, 569, 577, 587, 593, 683, 691, 727, 811, 839, 947, 1051, 1063, 1153, 1163, 1223, 1259, 1289, 1367, 1531, 1559, 1627, 1637, 1847, 1861, 1933, 1973, 1987, 2099, 2153, 2161, 2213, 2267, 2287, 2311
Offset: 1

Views

Author

Zak Seidov, Mar 08 2006

Keywords

Comments

Cf. A063643 Primes p such that p +- 2 are semiprimes.

Examples

			29 - 4 = 25 = 5*5 (semiprime). 29 + 4 = 33 = 3*11 (semiprime).
		

Crossrefs

Cf. A063643.

Programs

  • Mathematica
    fQ[n_] := Plus @@ Last /@ FactorInteger@n == 2; Select[ Prime@ Range[3, 345], fQ[ # - 4] && fQ[ # + 4] &] (* Robert G. Wilson v, May 01 2006 *)
    Select[Prime[Range[400]],PrimeOmega[#-4]==PrimeOmega[#+4]==2&] (* Harvey P. Dale, Oct 15 2017 *)

A115395 Primes p such that p+-6 are semiprimes.

Original entry on oeis.org

71, 127, 139, 149, 211, 241, 293, 397, 401, 409, 421, 479, 487, 491, 499, 521, 523, 617, 661, 673, 691, 701, 743, 761, 773, 787, 797, 809, 907, 911, 967, 1049, 1061, 1151, 1153, 1163, 1171, 1201, 1213, 1249, 1279, 1399, 1409, 1471, 1523, 1571, 1583, 1597
Offset: 1

Views

Author

Zak Seidov, Mar 08 2006

Keywords

Examples

			71-6=65=5*13 (semiprime), 71+6=77=7*11 (semiprime).
		

Crossrefs

Cf. A063643 Primes p such that p+-2 are semiprimes, A117328 Primes p such that p+-4 are semiprimes.

Programs

  • Mathematica
    A115395 = {}; k = Prime[n]; Do[If[PrimeOmega[k + 6] == 2 && PrimeOmega[k - 6] == 2, AppendTo[A115395, k]], {n, 1000}]; A115395  (* K. D. Bajpai, Jun 24 2014 *)
  • PARI
    lista(nn) = {pr = primes(nn); pp = select(i->((bigomega(i-6) == 2) && (bigomega(i+6) == 2)), pr); print(pp);} \\ Michel Marcus, Oct 09 2013

A371622 Primes p such that p - 2 and p + 2 have the same number of prime factors, counted with multiplicity.

Original entry on oeis.org

5, 23, 37, 53, 67, 89, 113, 131, 157, 173, 211, 251, 277, 293, 307, 337, 379, 409, 449, 487, 491, 499, 503, 607, 631, 683, 701, 719, 751, 769, 787, 919, 929, 941, 953, 991, 1009, 1039, 1117, 1129, 1181, 1193, 1201, 1237, 1259, 1381, 1399, 1439, 1459, 1471, 1493, 1499, 1511, 1549, 1567, 1597, 1613
Offset: 1

Views

Author

Zak Seidov and Robert Israel, Apr 01 2024

Keywords

Comments

Primes p such that A001222(p - 2) = A001222(p + 2).

Examples

			a(2) = 23 is a term because 23 is prime and 23 - 2 = 21 = 3 * 7 and 23 + 2 = 25 = 5^2 are both products of 2 primes, counted with multiplicity.
		

Crossrefs

Cf. A001222, A115103. Contains A063643, A063645 and A371651. Contained in A371656.

Programs

  • Maple
    filter:= p -> isprime(p) and numtheory:-bigomega(p-2) = numtheory:-bigomega(p+2):
    select(filter, [seq(i,i=3..10000,2)]);
  • Mathematica
    s = {}; p = 3; Do[While[PrimeOmega[p - 2] != PrimeOmega[p + 2], p =
    NextPrime[p]]; Print[p]; AppendTo[s, p]; p = NextPrime[p], {100}]; s

A063645 Primes with two representations: p*q*r - 2 = u*v*w + 2 where p, q, r, u, v and w are primes (not necessarily distinct).

Original entry on oeis.org

173, 277, 607, 929, 1129, 1181, 1237, 1493, 1549, 1597, 1613, 2011, 2063, 2137, 2423, 2677, 2753, 2767, 2797, 2819, 2851, 2917, 3449, 3533, 3607, 3617, 3727, 4013, 4073, 4177, 4201, 4253, 4493, 4523, 4583, 4691, 4919, 4951, 5119, 5237, 5273, 5393, 5407, 5557
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2001

Keywords

Examples

			5821 is a term: 5821 = A063641(204) = 5823 - 2 = 3*3*647 - 2, 5821 = A063642(225) = 5819 + 2 = 11*23*23 + 2.
		

Crossrefs

Programs

  • Maple
    q:= p-> isprime(p) and map(numtheory[bigomega], {p-2, p+2})={3}:
    select(q, [$2..6000])[];  # Alois P. Heinz, Apr 01 2024
  • Mathematica
    q[p_] := PrimeQ[p] && Union[PrimeOmega /@ {p-2, p+2}] == {3};
    Select[Range[2, 6000], q] (* Jean-François Alcover, Jan 13 2025, after Alois P. Heinz *)
  • PARI
    { n=0; for (m=2, 10^9, p=prime(m); if (bigomega(p + 2) == 3 && bigomega(p - 2) == 3, write("b063645.txt", n++, " ", p); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 27 2009

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}) &]

A241536 Smallest k>=1 such that prime(n)+k and prime(n)-k are both semiprimes, or a(n)=0 if there is no such k.

Original entry on oeis.org

0, 0, 1, 3, 0, 9, 8, 15, 2, 4, 27, 2, 8, 8, 8, 2, 10, 4, 2, 6, 4, 14, 28, 2, 32, 10, 8, 12, 14, 2, 6, 2, 4, 6, 6, 8, 2, 20, 34, 4, 24, 4, 14, 8, 12, 14, 2, 14, 8, 8, 14, 20, 6, 2, 8, 4, 20, 18, 10, 14, 16, 2, 2, 8, 8, 12, 4, 2, 8, 22, 12, 18, 26, 8, 2, 12, 18
Offset: 1

Views

Author

Vladimir Shevelev, Apr 25 2014

Keywords

Comments

If a(n)=2, then prime(n)+2 and prime(n)-2 are both semiprimes; that is, prime(n) belongs to A063643. - Michel Marcus, Mar 26 2015

Crossrefs

Programs

  • Mathematica
    sks[n_]:=Module[{k=1,p=Prime[n]},While[PrimeOmega[p+k]!=2||PrimeOmega[p-k]!=2||p-k<4,If[p-k<3,Break[]];k++];If[p-k<4,0,k]]; Array[sks,80] (* Harvey P. Dale, Dec 09 2016 *)
  • PARI
    a(n) = {p = prime(n); for (k=1, p-1, if ((bigomega(p-k)==2) && (bigomega(p+k) == 2), return (k));); return (0);} \\ Michel Marcus, Apr 25 2014

Extensions

More terms from Michel Marcus, Apr 25 2014
Name edited by Michel Marcus, Mar 26 2015

A242244 Primes p such that both p^2 + 2 and p^2 - 2 are semiprimes.

Original entry on oeis.org

11, 17, 53, 73, 79, 83, 97, 251, 269, 281, 379, 389, 433, 461, 601, 631, 691, 739, 827, 929, 947, 983, 1033, 1087, 1187, 1303, 1423, 1483, 1531, 1637, 1709, 1847, 1879, 2447, 2473, 2683, 2833, 2843, 3301, 3463, 3557, 3719, 3727, 3779, 3833, 3907, 3931, 4157
Offset: 1

Views

Author

K. D. Bajpai, May 09 2014

Keywords

Comments

Primes p such that p^2 + 2 = 3q, where q is prime, and p^2 - 2 is semiprime.

Examples

			a(1) = 11 is prime: 11^2 + 2 = 123 = 3 * 41 which is semiprime: 11^2 - 2 = 119 = 7 * 17 which is also semiprime.
a(2) = 17 is prime: 17^2 + 2 = 291 = 3 * 97 which is semiprime: 17^2 - 2 = 287 = 7 * 41 which is also semiprime.
		

Crossrefs

Programs

  • Maple
    with(numtheory):A242244:= proc()if isprime(x) and bigomega(x^2+2)=2 and bigomega(x^2-2)=2 then RETURN (x); fi; end: seq(A242244 (),x=1..5000);
  • Mathematica
    A242244 = {}; Do[p = Prime[n]; If[PrimeOmega[p^2 + 2] == 2 && PrimeOmega[p^2 - 2] == 2, AppendTo[A242244, p]], {n, 2000}]; A242244
    Select[Prime[Range[600]],PrimeOmega[#^2+{2,-2}]=={2,2}&] (* Harvey P. Dale, Apr 07 2018 *)
  • PARI
    is(n)=isprime(n) && isprime((n^2+2)\3) && bigomega(n^2-2)==2 \\ Charles R Greathouse IV, May 15 2014

A266845 Primes p such that p+-2 and p+-4 are semiprimes.

Original entry on oeis.org

53, 89, 449, 683, 1259, 4283, 6803, 11789, 12781, 13553, 16561, 18593, 18899, 20287, 29303, 35099, 36217, 37619, 52163, 54181, 64763, 65213, 67103, 103769, 115831, 116009, 125551, 126541, 147997, 154043, 155161, 155609, 166013, 173699, 181943, 188911, 190261, 196613
Offset: 1

Views

Author

Zak Seidov, Jan 04 2016

Keywords

Examples

			a(1)=53 because 53 - 2 = 51 = 3*17, 53 + 2 = 55 = 5*11.
		

Crossrefs

Subsequence of A063643.

Programs

  • Magma
    IsSemiprime:=func< p | &+[ k[2]: k in Factorization(p)] eq 2 >; [p: p in PrimesInInterval(3,2*10^5)| IsSemiprime(p+2) and IsSemiprime(p+4)and IsSemiprime(p-2) and IsSemiprime(p-4)]; // Vincenzo Librandi, Jan 10 2016
  • Maple
    filter:= proc(n) andmap(t -> numtheory:-bigomega(t)=2, [n-4,n-2,n+2,n+4]) end proc:
    select(filter, [seq(ithprime(i),i=1..20000)]); # Robert Israel, Aug 11 2019
  • Mathematica
    Select[Prime@ Range@ 18000, AllTrue[# + {-4, -2, 2, 4}, PrimeOmega@ # == 2 &] &] (* Michael De Vlieger, Jan 09 2016, Version 10 *)
  • PARI
    lista(nn) = {forprime(p=5, nn, if (bigomega(p-4)==2 && bigomega(p+4)==2 && bigomega(p-2)==2 && bigomega(p+2)==2, print1(p, ", ")); ); } \\ Michel Marcus, Jan 10 2016
    

A266847 Primes p such that p+/-2, p+/-4 and p+/-6 are semiprimes.

Original entry on oeis.org

6803, 52163, 67103, 116009, 155609, 196613, 242243, 277703, 523403, 706987, 764189, 973853, 1053863, 1307197, 1610333, 1823797, 1843687, 1995337, 2186603, 2487367, 2638747, 2875643, 2972663, 3032693, 3137399, 3179107, 3203243, 3209797, 3393809, 3454201, 3548033, 4302847, 4523093
Offset: 1

Views

Author

Zak Seidov, Jan 04 2016

Keywords

Examples

			a(1)=6803 because  6797=7*971, 6799=13*523, 6801=3*2267, 6805=5*1361, 6807=3*2269, 6809=11*619.
		

Crossrefs

Subsequence of A266845 and A063643.

Programs

  • Magma
    IsSemiprime:=func< p | &+[ k[2]: k in Factorization(p)] eq 2 >; [p: p  in PrimesInInterval(3,4*10^6)| IsSemiprime(p+2) and IsSemiprime(p-2) and IsSemiprime(p+4) and IsSemiprime(p-4)and IsSemiprime(p+6) and IsSemiprime(p-6)]; // Vincenzo Librandi, Jan 07 2016
  • PARI
    lista(nn) = {forprime(p=7, nn, if (bigomega(p-6)==2 && bigomega(p+6)==2 && bigomega(p-4)==2 && bigomega(p+4)==2 && bigomega(p-2)==2 && bigomega(p+2)==2, print1(p, ", ")););} \\ Michel Marcus, Jan 07 2016
    

Extensions

More terms from Michel Marcus, Jan 07 2016
Showing 1-10 of 13 results. Next