OFFSET
1,1
COMMENTS
p-6 will be prime if the prime triple contains the last 3 primes of a sexy prime quadruple.
If a sexy prime triple happens to include the last 3 members of a sexy prime quadruple, this sequence will contain the sexy prime triple's smallest member; e.g., a(4)=47 is the smallest member of the sexy prime triple (47, 53, 59), but is also the second member of the sexy prime quadruple (41, 47, 53, 59). - Daniel Forgues, Aug 05 2009
LINKS
Eric M. Schmidt, Table of n, a(n) for n = 1..1000
Maxie D. Schmidt, New Congruences and Finite Difference Equations for Generalized Factorial Functions, arXiv:1701.04741 [math.CO], 2017.
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].
MATHEMATICA
lst={}; Do[p=Prime[n]; If[PrimeQ[p+6]&&PrimeQ[p+12]&&!PrimeQ[p+18], AppendTo[lst, p]], {n, 7!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 29 2008 *)
Select[Prime[Range[500]], AllTrue[#+{6, 12}, PrimeQ]&&CompositeQ[#+18]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 11 2019 *)
PROG
(PARI) lista(nn) = forprime(p=3, nn, if (isprime(p+6) && isprime(p+12) && !isprime(p+18), print1(p, ", ")); ); \\ Michel Marcus, Jan 06 2015
(Magma) [p: p in PrimesUpTo(5000) | not IsPrime(p+18) and IsPrime(p+6) and IsPrime(p+12)]; // Vincenzo Librandi, Sep 07 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Definition edited by Daniel Forgues, Aug 12 2009
More terms from Eric M. Schmidt, Sep 07 2017
STATUS
approved