OFFSET
1,1
COMMENTS
Semiprime of the form 4*m^2-9 = (2*m-3)*(2*m+3). - Vincenzo Librandi, Jan 26 2016
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Sexy Primes. [The definition in this webpage is unsatisfactory, because it defines a "sexy prime" as a pair of primes.- N. J. A. Sloane, Mar 07 2021].
FORMULA
EXAMPLE
a(2)=91 because the second sexy prime pair is (7, 13) and 7*13=91.
MATHEMATICA
#(#+6)&/@Select[Prime[Range[100]], PrimeQ[#+6]&] [Harvey P. Dale, Dec. 17, 2010]
(* For checking large numbers, the following code is better. For instance, we could use the fQ function to determine that 229031718473564142083 is not in this sequence. *) fQ[n_] := Block[{fi = FactorInteger[n]}, Last@# & /@ fi == {1, 1} && Differences[ First@# & /@ fi] == {6}]; Select[ Range[125000], fQ] (* Robert G. Wilson v, Feb 08 2012 *)
Select[Table[4 n^2 - 9, {n, 300}], PrimeOmega[#] == 2 &] (* Vincenzo Librandi, Jan 26 2016 *)
PROG
(Haskell)
a111192 n = a111192_list !! (n-1)
a111192_list = f a000040_list where
f (p:ps@(q:r:_)) | q - p == 6 = (p*q) : f ps
| r - p == 6 = (p*r) : f ps
| otherwise = f ps
-- Reinhard Zumkeller, Sep 13 2011
(Magma) IsSemiprime:=func<n | &+[d[2]: d in Factorization(n)] eq 2>; [s: n in [1..300] | IsSemiprime(s) where s is 4*n^2-9]; // Vincenzo Librandi, Jan 26 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Shawn M Moore (sartak(AT)gmail.com), Oct 23 2005
STATUS
approved