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 A022004 #120 Feb 16 2025 08:32:34 %S A022004 5,11,17,41,101,107,191,227,311,347,461,641,821,857,881,1091,1277, %T A022004 1301,1427,1481,1487,1607,1871,1997,2081,2237,2267,2657,2687,3251, %U A022004 3461,3527,3671,3917,4001,4127,4517,4637,4787,4931,4967,5231,5477 %N A022004 Initial members of prime triples (p, p+2, p+6). %C A022004 Subsequence of A001359. - _R. J. Mathar_, Feb 10 2013 %C A022004 All terms are congruent to 5 (mod 6). - _Matt C. Anderson_, May 22 2015 %C A022004 Intersection of A001359 and A023201. - _Zak Seidov_, Mar 12 2016 %H A022004 Matt C. Anderson <a href="/A022004/b022004.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from T. D. Noe) %H A022004 T. Forbes and Norman Luhn, <a href="http://www.pzktupel.de/ktuplets">Prime k-tuplets</a> %H A022004 R. J. Mathar, <a href="/A022004/a022004_2.pdf">Table of Prime Gap Constellations</a> (2013,2024), 275 pages (no not print...) %H A022004 Thomas R. Nicely, <a href="https://faculty.lynchburg.edu/~nicely/triples/t3a_0000.htm">Enumeration of the prime triples (q,q+2,q+6) to 1e16</a>. %H A022004 P. Pollack, <a href="http://www.math.dartmouth.edu/~ppollack/notes.pdf">Analytic and Combinatorial Number Theory</a>, Course Notes, p. 132, ex. 3.4.3. [Broken link?] %H A022004 P. Pollack, <a href="http://alpha01.dm.unito.it/personalpages/cerruti/ac/notes.pdf">Analytic and Combinatorial Number Theory</a>, Course Notes, p. 132, ex. 3.4.3. %H A022004 Maxie D. Schmidt, <a href="https://arxiv.org/abs/1701.04741">New Congruences and Finite Difference Equations for Generalized Factorial Functions</a>, arXiv:1701.04741 [math.CO], 2017. %H A022004 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimeTriplet.html">Prime Triplet</a> %H A022004 <a href="/index/Pri#gaps">Index entries for primes, gaps between</a> %p A022004 A022004 := proc(n) %p A022004 if n= 1 then %p A022004 5; %p A022004 else %p A022004 for a from procname(n-1)+2 by 2 do %p A022004 if isprime(a) and isprime(a+2) and isprime(a+6) then %p A022004 return a; %p A022004 end if; %p A022004 end do: %p A022004 end if; %p A022004 end proc: # _R. J. Mathar_, Jul 11 2012 %t A022004 Select[Prime[Range[1000]], PrimeQ[#+2] && PrimeQ[#+6]&] (* _Vladimir Joseph Stephan Orlovsky_, Mar 30 2011 *) %t A022004 Transpose[Select[Partition[Prime[Range[1000]],3,1],Differences[#]=={2,4}&]][[1]] (* _Harvey P. Dale_, Dec 24 2011 *) %o A022004 (Magma) [ p: p in PrimesUpTo(10000) | IsPrime(p+2) and IsPrime(p+6) ] // _Vincenzo Librandi_, Nov 19 2010 %o A022004 (PARI) is(n)=isprime(n)&&isprime(n+2)&&isprime(n+6) \\ _Charles R Greathouse IV_, Jul 01 2013 %o A022004 (Python) %o A022004 from sympy import primerange %o A022004 def aupto(limit): %o A022004 p, q, alst = 2, 3, [] %o A022004 for r in primerange(5, limit+7): %o A022004 if p+2 == q and p+6 == r: alst.append(p) %o A022004 p, q = q, r %o A022004 return alst %o A022004 print(aupto(5477)) # _Michael S. Branicky_, May 11 2021 %Y A022004 Cf. A073648, A098412, A372247 (subsequence). %Y A022004 Cf. A001359, A023201. %Y A022004 Subsequence of A007529. %K A022004 nonn,easy %O A022004 1,1 %A A022004 _Warut Roonguthai_