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 A007508 M1855 #117 Apr 22 2025 08:02:31 %S A007508 2,8,35,205,1224,8169,58980,440312,3424506,27412679,224376048, %T A007508 1870585220,15834664872,135780321665,1177209242304,10304195697298, %U A007508 90948839353159,808675888577436 %N A007508 Number of twin prime pairs below 10^n. %C A007508 "At the present time (2001), Thomas Nicely has reached pi_2(3*10^15) and his value is confirmed by Pascal Sebah who made a new computation from scratch and up to pi_2(5*10^15) [ = 5357875276068] with an independent implementation." %C A007508 Though the first paper contributed by D. A. Goldston was reported to be flawed, the more recent one (with other coauthors) maintains and substantiates the result. - _Lekraj Beedassy_, Aug 19 2005 %C A007508 Theorem. While g is even, g > 0, number of primes p < x (x is an integer) such that p' = p + g is also prime, could be written as qpg(x) = qcc(x) - (x - pi(x) - pi(x + g) + 1) where qcc(x) is the number of "common composite numbers" c <= x such that c and c' = c + g both are composite (see Example below; I propose it here as a theorem only not to repeat for so-called "cousin"-primes (p; p+4), "sexy"-primes (p; p+6), etc.). - _Sergey Pavlov_, Apr 08 2021 %D A007508 Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 202. %D A007508 Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 195. %D A007508 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A007508 Richard P. Brent, <a href="https://doi.org/10.1090/S0025-5718-1975-0369287-1">Irregularities in the distribution of primes and twin primes</a>, Math. Comp. 29 (1975), 43-56. %H A007508 C. K. Caldwell, <a href="http://www.utm.edu/~caldwell/preprints/Heuristics.pdf">An amazing prime heuristic</a>, Table 1. %H A007508 C. K. Caldwell, The Prime Glossary, <a href="https://t5k.org/glossary/page.php/TwinPrimeConjecture.html">Twin prime conjecture</a> %H A007508 T. H. Chan, <a href="https://arxiv.org/abs/math/0503441">A note on Primes in Short Intervals</a>, arXiv:math/0503441 [math.NT], 2005. %H A007508 P. Erdős, <a href="http://dx.doi.org/10.1307/mmj/1028997963">Some Unsolved Problems</a>, Michigan Math. J., Volume 4, Issue 3 (1957), 291-300. %H A007508 G. H. Gadiyar & R. Padma, <a href="http://arXiv.org/abs/hep-th/9806061">Renormalisation and the density of prime pairs</a>, arXiv:hep-th/9806061, 1998. %H A007508 G. H. Gadiyar & R. Padma, <a href="http://empslocal.ex.ac.uk/people/staff/mrwatkin/zeta/padma.pdf">Ramanujan-Fourier series, the Wiener-Khintchine formula and the distribution of prime pairs</a>, Physica A 269 (1999) 503-510. %H A007508 D. A. Goldston, J. Pintz & C. Y. Yildirim, <a href="https://arxiv.org/abs/math/0508185">Primes in Tuples, I</a>, arXiv:math/0508185 [math.NT], 2005. %H A007508 D. A. Goldston, J. Pintz & C. Y. Yildirim, <a href="http://www.math.sjsu.edu/~goldston/gpy02-08-05.pdf">Small Gaps Between Primes, II</a> %H A007508 D. A. Goldston, J. Pintz & C. Y. Yildirim, <a href="http://arXiv.org/abs/math/0512436">The Path to Recent Progress on Small Gaps Between Primes</a>, arXiv:math/0512436 [math.NT], 2005-2006. %H A007508 D. A. Goldston & C. Y. Yildirim, <a href="https://arxiv.org/abs/math/0504336">Small Gaps Between Primes, I</a>, arXiv:math/0504336 [math.NT], 2005. %H A007508 D. A. Goldston & C. Yildirim, <a href="https://web.archive.org/web/20080309063536/http://aimath.org/primegaps/goldston_tech/">Small gaps between consecutive primes</a> %H A007508 D. A. Goldston et al., <a href="https://arxiv.org/abs/math/0506067">Small gaps between primes or almost primes</a>, arXiv:math/0506067 [math.NT], 2005. %H A007508 D. A. Goldston et al., <a href="https://arxiv.org/abs/math/0505300">Small Gaps between Primes Exist</a>, arXiv:math/0505300 [math.NT], 2005. %H A007508 Xavier Gourdon and Pascal Sebah, <a href="http://numbers.computation.free.fr/Constants/Primes/twin.html">Introduction to Twin Primes and Brun's Constant</a> %H A007508 A. Granville & K. Soundararajan, <a href="https://web.archive.org/web/20110724230750/http://aimath.org/primegaps/residueerror/">On the error in Goldston and Yildirim's "Small gaps between consecutive primes"</a> %H A007508 Gareth A. Jones and Alexander K. Zvonkin, <a href="https://arxiv.org/abs/2104.12015">Klein's ten planar dessins of degree 11, and beyond</a>, arXiv:2104.12015 [math.GR], 2021. See p. 24. %H A007508 P. F. Kelly & F. Pilling, <a href="https://arxiv.org/abs/math/0103191">Characterization of the Distribution of Twin Primes</a>, arXiv:math/0103191 [math.NT], 2001. %H A007508 P. F. Kelly & T. Pilling, <a href="https://arxiv.org/abs/math/0104205">Implications of a New Characterization of the Distribution of Twin Primes</a>, arXiv:math/0104205 [math.NT], 2001. %H A007508 P. F. Kelly & T. Pilling, <a href="https://arxiv.org/abs/math/0106223">Discrete Reanalysis of a New Model of the Distribution of Twin Primes</a>, arXiv:math/0106223 [math.NT], 2001. %H A007508 James Maynard, <a href="https://arxiv.org/abs/1910.14674">On the Twin Prime Conjecture</a>, arXiv:1910.14674 [math.NT], 2019, p. 2. %H A007508 Thomas R. Nicely, <a href="https://faculty.lynchburg.edu/~nicely/gaps/gaplist.html">First occurrence prime gaps</a> [For local copy see A000101] %H A007508 Thomas R. Nicely, <a href="https://faculty.lynchburg.edu/~nicely/twins/twins.html">Enumeration to 10^14 of the twin primes and Brun's constant</a>, Virginia Journal of Science, 46:3 (Fall, 1995), 195-204. %H A007508 Thomas R. Nicely, <a href="/A001359/a001359.pdf">Enumeration to 10^14 of the twin primes and Brun's constant</a> [Local copy, pdf only] %H A007508 Nova Science, <a href="http://www.pbs.org/wgbh/nova/sciencenow/3302/02.html">Twin Prime Conjecture</a> %H A007508 Tomás Oliveira e Silva, <a href="http://sweet.ua.pt/tos/primes.html">Tables of values of pi(x) and of pi2(x)</a> [From _M. F. Hasler_, Dec 18 2008] %H A007508 J. Richstein, <a href="https://web.archive.org/web/20040911002922/http://www.informatik.uni-giessen.de/staff/richstein/res/tp-en.html">Computing the number of twin primes up to 10^14</a> %H A007508 J. Richstein, <a href="https://web.archive.org/web/20070711220924/http://www.mscs.dal.ca/~joerg/res/tp-en.html">Computing the number of twin primes up to 10^14</a> %H A007508 J. Sondow, J. W. Nicholson, and T. D. Noe, <a href="http://arxiv.org/abs/1105.2249"> Ramanujan Primes: Bounds, Runs, Twins, and Gaps</a>, arXiv:1105.2249 [math.NT], 2011; J. Integer Seq. 14 (2011) Article 11.6.2. %H A007508 Jonathan P. Sorenson, Jonathan Webster, <a href="https://arxiv.org/abs/1807.08777">Two Algorithms to Find Primes in Patterns</a>, arXiv:1807.08777 [math.NT], 2018. %H A007508 K. Soundararajan, <a href="https://arxiv.org/abs/math/0606408">The distribution of prime numbers</a>, arXiv:math/0606408 [math.NT], 2006. %H A007508 K. Soundararajan, <a href="https://arxiv.org/abs/math/0605696">Small gaps between prime numbers:The work of Goldston-Pintz-Yildirim</a>, arXiv:math/0605696 [math.NT], 2006. %H A007508 K. Soundararajan, <a href="http://dx.doi.org/10.1090/S0273-0979-06-01142-6">Small gaps between prime numbers:The work of Goldston-Pintz-Yildirim</a>, Bull. Amer. Math. Soc. 44 (2007), 1-18. %H A007508 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/TwinPrimes.html">Twin Primes</a> %H A007508 Eric Weisstein, Mathworld Headline News, <a href="https://mathworld.wolfram.com/news/2004-06-09/twinprimes">Twin Primes Proof Proffered</a> %H A007508 M. Wolf, <a href="http://arXiv.org/abs/math/0105211">Some Remarks on the Distribution of twin Primes</a>, arXiv:math/0105211 [math.NT], 2001. %H A007508 C. Yildirim & D. Goldston, <a href="http://www.math.boun.edu.tr/instructors/yildirim/yildirimtech.htm">Small gaps between consecutive primes</a> %H A007508 <a href="/index/Pri#primepop">Index entries for sequences related to numbers of primes in various ranges</a> %F A007508 Partial sums of A070076(n). - _Lekraj Beedassy_, Jun 11 2004 %F A007508 For 1 < n < 19, a(n) ~ e * pi(10^n) / (5*n - 5) = e * A006880(n) / (5*n - 5) where e is Napier's constant, see A001113 (probably, so is for any n > 18; we use n > 1 to avoid division by zero). - _Sergey Pavlov_, Apr 07 2021 %F A007508 For any n, a(n) = qcc(x) - (10^n - pi(10^n) - pi(10^n + 2) + 1) where qcc(x) is the number of "common composite numbers" c <= 10^n such that c and c' = c + 2 both are composite (trivial). - _Sergey Pavlov_, Apr 08 2021 %e A007508 For x = 10, qcc(x) = 4 (since 2 is prime; 4, 6, 8, 10 are even, and no odd 0 < d < 25 such that both d and d' = d + 2 are composite), pi(10) = 4, pi(10 + 2) = 5, but, while v = 2+2 or v = 2-2 would be even, we must add 1; hence, a(1) = qcc(10^1) - (10^1 - pi(10^1) - pi(10^1 + 2) + 1) = 4 - (10 - 4 - 5 + 1) = 2 (trivial). - _Sergey Pavlov_, Apr 08 2021 %t A007508 ile = 2; Do[Do[If[(PrimeQ[2 n - 1]) && (PrimeQ[2 n + 1]), ile = ile + 1], {n, 5*10^m, 5*10^(m + 1)}]; Print[{m, ile}], {m, 0, 7}] (* _Artur Jasinski_, Oct 24 2011 *) %o A007508 (PARI) a(n)=my(s,p=2);forprime(q=3,10^n,if(q-p==2,s++);p=q);s \\ _Charles R Greathouse IV_, Mar 21 2013 %Y A007508 Cf. A001097. %Y A007508 Cf. A173081 and A181678 (number of twin Ramanujan prime pairs below 10^n). %Y A007508 Cf. A152051, A347278, A347279. %K A007508 nonn,nice,hard,more %O A007508 1,1 %A A007508 _N. J. A. Sloane_, _Robert G. Wilson v_ %E A007508 pi2(10^15) due to Nicely and Szymanski, contributed by _Eric W. Weisstein_ %E A007508 pi2(10^16) due to Pascal Sebah, contributed by _Robert G. Wilson v_, Aug 22 2002 %E A007508 Added a(17)-a(18) computed by Tomás Oliveira e Silva and link to his web site. - _M. F. Hasler_, Dec 18 2008 %E A007508 Definition corrected by _Max Alekseyev_, Oct 25 2010 %E A007508 a(16) corrected by _Dana Jacobsen_, Mar 28 2014