%I A022004 #133 Jun 11 2026 11:52:57 %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 Table of n, a(n) for n = 1..10000 (terms 1..1000 from T. D. Noe) %H A022004 T. Forbes and Norman Luhn, Prime k-tuplets %H A022004 Norman Luhn, The big database of "The smallest prime k-tuplets" (compressed files). %H A022004 R. J. Mathar, Table of Prime Gap Constellations (2013,2024), 275 pages (no not print...) %H A022004 Thomas R. Nicely, Enumeration of the prime triples (q,q+2,q+6) to 1e16. %H A022004 P. Pollack, Analytic and Combinatorial Number Theory, Course Notes, p. 132, ex. 3.4.3. [Broken link] %H A022004 P. Pollack, Analytic and Combinatorial Number Theory, Course Notes, p. 132, ex. 3.4.3. %H A022004 Maxie D. Schmidt, New Congruences and Finite Difference Equations for Generalized Factorial Functions, arXiv:1701.04741 [math.CO], 2017. %H A022004 Eric Weisstein's World of Mathematics, Prime Triplet %H A022004 Index entries for primes, gaps between %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, A022005, A023201. %Y A022004 Subsequence of A007529. %K A022004 nonn,easy %O A022004 1,1 %A A022004 _Warut Roonguthai_