A266845 Primes p such that p+-2 and p+-4 are semiprimes.
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
Keywords
Examples
a(1)=53 because 53 - 2 = 51 = 3*17, 53 + 2 = 55 = 5*11.
Links
- Robert Israel, Table of n, a(n) for n = 1..2500
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