OFFSET
1,1
COMMENTS
All listed terms are congruent to 1 modulo 12.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
15121 is prime (or 1-almost prime), 15122=2*7561 is semiprime (or 2-almost prime), 15123=3*71*71 is 3-almost prime, 15124=2*2*29*199 is 4-almost prime, 15125=5*5*5*11*11 is 5-almost prime.
MATHEMATICA
f[n_] := Plus @@ Last /@ FactorInteger@n; t = {}; Do[p = Prime[n]; If[Array[ f[p + # ] &, 4] == {2, 3, 4, 5}, AppendTo[t, p]], {n, 126483}]; t (* Robert G. Wilson v *)
aprQ[p_]:=Total[FactorInteger[#][[All, 2]]]&/@Range[p+1, p+4]=={2, 3, 4, 5}; Select[ Prime[ Range[120000]], aprQ] (* Harvey P. Dale, Dec 17 2022 *)
PROG
(Magma) [n: n in PrimesUpTo(2*10^6) | forall{k: k in [1..4] | &+[f[j, 2]: j in [1..#f]] eq k+1 where f is Factorization(n+k)}]; // Vincenzo Librandi, Sep 24 2012
(PARI) list(lim)=my(v=List(), L=(lim+2)\3, t); forprime(p=3, L\3, forprime(q=3, min(L\p, p), t=3*p*q-2; if(t%12==1 && isprime(t) && isprime((t+1)/2) && bigomega(t+3)==4 && bigomega(t+4)==5, listput(v, t)))); Set(v) \\ Charles R Greathouse IV, Feb 05 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Jan 03 2006
EXTENSIONS
More terms from Robert G. Wilson v, Jan 05 2006
STATUS
approved