OFFSET
1,1
COMMENTS
4k+4 = 4*(k+1) = 2*2*(k+1) cannot be semiprime as well, as it has at least 3 prime factors with multiplicity. Thus there are no four consecutive semiprimes.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
EXAMPLE
a(1) = 8 because 4*8+1 = 33 = 3*11 is semiprime and 4*8+2 = 34 = 2*17 is semiprime and 4*8+3 = 35 = 3*5 is semiprime.
MATHEMATICA
Select[Range[1100], Union[PrimeOmega[4#+{1, 2, 3}]]=={2}&] (* Harvey P. Dale, Feb 02 2015 *)
PROG
(Magma) IsSemiprime:=func< n | &+[k[2]: k in Factorization(n)] eq 2 >; [ n: n in [2..1500] | IsSemiprime(4*n+1) and IsSemiprime(4*n+2) and IsSemiprime(4*n+3) ]; // Vincenzo Librandi, Dec 22 2010
(Python)
from sympy import factorint, isprime
def issemiprime(n):
return sum(factorint(n).values()) == 2 if n&1 else isprime(n//2)
def ok(n): return all(issemiprime(4*n+i) for i in (2, 1, 3))
print([k for k in range(1500) if ok(k)]) # Michael S. Branicky, Nov 26 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Oct 09 2006
EXTENSIONS
336 and 680 added by Vincenzo Librandi, Dec 22 2010
STATUS
approved