Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #14 Sep 29 2012 18:18:41
%S 13,29,61,109,137,149,181,197,229,257,277,281,317,349,389,401,457,461,
%T 541,557,569,617,677,761,797,821,929,937,977,1021,1097,1129,1217,1237,
%U 1289,1297,1321,1481,1489,1549,1597,1621,1721,1777,1861,1877,1997,2029
%N Primes p such that p-3 is the greatest semiprime less than p.
%C Subsequence of A089531.
%H T. D. Noe, <a href="/A217197/b217197.txt">Table of n, a(n) for n = 1..1000</a>
%e 977 is prime, 976 = 2^4*61 and 975 = 3*5^2*13 are not semiprimes, 974 = 2*487 is a semiprime.
%t SemiPrimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])]; Select[Prime[Range[500]], ! SemiPrimeQ[# - 1] && ! SemiPrimeQ[# - 2] && SemiPrimeQ[# - 3] &] (* _T. D. Noe_, Sep 27 2012 *)
%o (PARI) forprime(p=5, 9999, bigomega(p-3)==2 && bigomega(p-1)!=2 && bigomega(p-2)!=2 & print1(p", "))
%Y Cf. A217195.
%K nonn
%O 1,1
%A _Antonio Roldán_, Sep 27 2012