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 A006512 M3763 #166 Jun 15 2025 23:16:37 %S A006512 5,7,13,19,31,43,61,73,103,109,139,151,181,193,199,229,241,271,283, %T A006512 313,349,421,433,463,523,571,601,619,643,661,811,823,829,859,883,1021, %U A006512 1033,1051,1063,1093,1153,1231,1279,1291,1303,1321,1429,1453,1483,1489,1609 %N A006512 Greater of twin primes. %C A006512 Also primes that are the sum of two primes (which is possible only if 2 is one of the primes). - _Cino Hilliard_, Jul 02 2004, edited by _M. F. Hasler_, Nov 14 2019 %C A006512 The set of greater of twin primes larger than five is a proper subset of the set of primes of the form 3n + 1 (A002476). - _Paul Muljadi_, Jun 05 2008 %C A006512 Smallest prime > n-th isolated composite. - _Juri-Stepan Gerasimov_, Nov 07 2009 %C A006512 Subsequence of A175075. Union of a(n) and sequence A175080 is A175075. - _Jaroslav Krizek_, Jan 30 2010 %C A006512 A164292(a(n))=1; A010051(a(n)+2)=0 for n > 1. - _Reinhard Zumkeller_, Mar 29 2010 %C A006512 Omega(n) = Omega(n-2); d(n) = d(n-2). - _Juri-Stepan Gerasimov_, Sep 19 2010 %C A006512 Aside from the first term, all subsequent terms have digital root 1, 4, or 7. - _J. W. Helkenberg_, Jul 24 2013 %C A006512 Also primes p with property that the sum of the successive gaps between primes <= p is a prime number. - _Robert G. Wilson v_, Dec 19 2014 %C A006512 The phrase "x is an element of the {primes, positive integers} and there {exist no, exist} elements a,b of {1 and primes, primes}: a+b=x" determines A133410, A067829, A025584, A006512, A166081, A014092, A014091 and A038609 for the first few hundred terms with only de-duplication or omitting/including 3, 4 and 6 in the case of A166081/A014091 and one case of omitting/including 3 given 1 isn't prime. - _Harry G. Coin_, Nov 25 2015 %C A006512 The yet unproved Twin Prime Conjecture states that this sequence is infinite. - _M. F. Hasler_, Nov 14 2019 %D A006512 See A001359 for further references and links. %D A006512 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A006512 T. D. Noe, <a href="/A006512/b006512.txt">Table of n, a(n) for n = 1..10000</a> %H A006512 Harvey Dubner, <a href="http://www.emis.de/journals/JIS/VOL8/Dubner/dubner71.html">Twin Prime Statistics</a>, Journal of Integer Sequences, Vol. 8 (2005), Article 05.4.2. %H A006512 R. K. Guy, <a href="/A006511/a006511.pdf">Letter to N. J. A. Sloane, Jun 1991</a> %H A006512 Ernest G. Hibbs, <a href="https://www.proquest.com/openview/4012f0286b785cd732c78eb0fc6fce80">Component Interactions of the Prime Numbers</a>, Ph. D. Thesis, Capitol Technology Univ. (2022), see p. 33. %H A006512 Omar E. Pol, <a href="http://www.polprimos.com">Determinacion geometrica de los numeros primos y perfectos</a>. %H A006512 Mario Raso, <a href="https://hdl.handle.net/11573/1732819">Integer Sequences in Cryptography: A New Generalized Family and its Application</a>, Ph. D. Thesis, Sapienza University of Rome (Italy 2025). See p. 114. %H A006512 Wikipedia, <a href="https://en.wikipedia.org/wiki/Twin_prime#History">Twin prime</a>. %H A006512 <a href="/index/Pri#gaps">Index entries for primes, gaps between</a> %p A006512 for i from 1 to 253 do if ithprime(i+1) = ithprime(i) + 2 then print({ithprime(i+1)}); fi; od; # _Zerinvary Lajos_, Mar 19 2007 %p A006512 P := select(isprime,[$1..1609]): select(p->member(p-2,P),P); # _Peter Luschny_, Mar 03 2011 %p A006512 A006512 := proc(n) %p A006512 2+A001359(n) ; %p A006512 end proc: # _R. J. Mathar_, Nov 26 2014 %t A006512 Select[Prime[Range[254]], PrimeQ[# - 2] &] (* _Robert G. Wilson v_, Jun 09 2005 *) %t A006512 Transpose[Select[Partition[Prime[Range[300]], 2, 1], Last[#] - First[#] == 2 &]][[2]] (* _Harvey P. Dale_, Nov 02 2011 *) %t A006512 Cases[Prime[Range[500]] + 2, _?PrimeQ] (* _Fred Patrick Doty_, Aug 23 2017 *) %o A006512 (PARI) select(p->isprime(p-2),primes(1000)) %o A006512 (Magma) [n: n in PrimesUpTo(1610)|IsPrime(n-2)]; // _Bruno Berselli_, Feb 28 2011 %o A006512 (Haskell) %o A006512 a006512 = (+ 2) . a001359 -- _Reinhard Zumkeller_, Feb 10 2015 %o A006512 (PARI) a(n)=p=3; while(p+2 < (p=nextprime(p+1)) || n-->0, ); p %o A006512 vector(100, n, a(n)) \\ _Altug Alkan_, Dec 04 2015 %o A006512 (Python) %o A006512 from sympy import primerange, isprime %o A006512 print([n for n in primerange(1, 2001) if isprime(n - 2)]) # _Indranil Ghosh_, Jul 20 2017 %Y A006512 Subsequence of A139690. %Y A006512 Bisection of A077800. %Y A006512 Cf. A001097, A001359, A014574, A067829, A002476. %K A006512 nonn,nice,easy %O A006512 1,1 %A A006512 _N. J. A. Sloane_