This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A023271 #55 Feb 16 2025 08:32:34 %S A023271 5,11,41,61,251,601,641,1091,1481,1601,1741,1861,2371,2671,3301,3911, %T A023271 4001,5101,5381,5431,5641,6311,6361,9461,11821,12101,12641,13451, %U A023271 14621,14741,15791,15901,17471,18211,19471,20341,21481,23321,24091,26171,26681 %N A023271 Primes p such that p, p+6, p+12, p+18 are all primes. %C A023271 Smallest member of a "sexy" prime quadruple. %C A023271 For n > 1, a(n) ends in 1. - _Robert Israel_, Jul 16 2015 %C A023271 The only sexy prime quintuple corresponding to (p, p+6, p+12, p+18, p+24) starts with a(1) = 5, so this quintuple is (5, 11, 17, 23, 29) (see Wikipedia link and A206039). - _Bernard Schott_, Mar 10 2023 %H A023271 Matt C. Anderson and Robert Israel, <a href="/A023271/b023271.txt">Table of n, a(n) for n = 1..10000</a> (n = 1..100 from Matt C. Anderson) %H A023271 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SexyPrimes.html">Sexy Primes</a>. [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] %H A023271 Wikipedia, <a href="https://en.wikipedia.org/wiki/Sexy_prime">Sexy prime</a>. %p A023271 for a to 2*10^5 do %p A023271 if `and`(isprime(a), isprime(a+6), isprime(a+12), isprime(a+18)) %p A023271 then print(a); %p A023271 end if; %p A023271 end do; %p A023271 # code produces 109 primes %p A023271 # _Matt C. Anderson_, Jul 15 2015 %t A023271 Select[Prime[Range[1000]], PrimeQ[# + 6] && PrimeQ[# + 12] && PrimeQ[# + 18] &] (* _Vincenzo Librandi_, Jul 15 2015 *) %t A023271 (* 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 *) %o A023271 (Magma) [p: p in PrimesInInterval(2, 1000000) | forall{i: i in [ 6, 12, 18] | IsPrime(p+i)}]; // _Vincenzo Librandi_, Jul 15 2015 %o A023271 (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 %Y A023271 Cf. A023201, A046117, A046122, A046123, A046124, A206039. %K A023271 nonn %O A023271 1,1 %A A023271 _David W. Wilson_ %E A023271 Edited by _N. J. A. Sloane_, Aug 04 2009 following a suggestion from _Daniel Forgues_