login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A023271 Primes p such that p, p+6, p+12, p+18 are all primes. 18
5, 11, 41, 61, 251, 601, 641, 1091, 1481, 1601, 1741, 1861, 2371, 2671, 3301, 3911, 4001, 5101, 5381, 5431, 5641, 6311, 6361, 9461, 11821, 12101, 12641, 13451, 14621, 14741, 15791, 15901, 17471, 18211, 19471, 20341, 21481, 23321, 24091, 26171, 26681 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Smallest member of a "sexy" prime quadruple.

For n > 1, a(n) ends in 1. - Robert Israel, Jul 16 2015

LINKS

Matt C. Anderson and Robert Israel, Table of n, a(n) for n = 1..10000 (n = 1..100 from Matt C. Anderson)

Eric Weisstein's World of Mathematics, Sexy Primes.

MAPLE

for a to 2*10^5 do

if `and`(isprime(a), isprime(a+6), isprime(a+12), isprime(a+18))

then print(a);

end if;

end do;

# code produces 109 primes

# Matt C. Anderson, Jul 15 2015

MATHEMATICA

Select[Prime[Range[1000]], PrimeQ[# + 6] && PrimeQ[# + 12] && PrimeQ[# + 18] &] (* Vincenzo Librandi, Jul 15 2015 *)

(* The following program uses the AllTrue function from Mathematica version 10 *) Select[Prime[Range[3000]], AllTrue[# + {6, 12, 18}, PrimeQ] &] (* Harvey P. Dale, Jun 06 2017 *)

PROG

(MAGMA) [p: p in PrimesInInterval(2, 1000000) | forall{i: i in [ 6, 12, 18] | IsPrime(p+i)}]; // Vincenzo Librandi, Jul 15 2015

(PARI) main(size)=my(v=vector(size), i, r=1, p); for(i=1, size, while(1, p=prime(r); if(isprime(p+6)&&isprime(p+12)&&isprime(p+18), v[i]=p; r++; break, r++))); v \\ Anders Hellström, Jul 16 2015

CROSSREFS

Cf. A023201, A046117, A046122, A046123, A046124.

Sequence in context: A154297 A089441 A046121 * A159049 A047976 A006382

Adjacent sequences:  A023268 A023269 A023270 * A023272 A023273 A023274

KEYWORD

nonn

AUTHOR

David W. Wilson

EXTENSIONS

Edited by N. J. A. Sloane, Aug 04 2009 following a suggestion from Daniel Forgues

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 24 06:53 EST 2020. Contains 338607 sequences. (Running on oeis4.)