cp's OEIS Frontend

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.

Showing 1-3 of 3 results.

A007508 Number of twin prime pairs below 10^n.

Original entry on oeis.org

2, 8, 35, 205, 1224, 8169, 58980, 440312, 3424506, 27412679, 224376048, 1870585220, 15834664872, 135780321665, 1177209242304, 10304195697298, 90948839353159, 808675888577436
Offset: 1

Views

Author

Keywords

Comments

"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."
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
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

Examples

			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
		

References

  • Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 202.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 195.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001097.
Cf. A173081 and A181678 (number of twin Ramanujan prime pairs below 10^n).

Programs

  • Mathematica
    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 *)
  • 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

Formula

Partial sums of A070076(n). - Lekraj Beedassy, Jun 11 2004
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
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

Extensions

pi2(10^15) due to Nicely and Szymanski, contributed by Eric W. Weisstein
pi2(10^16) due to Pascal Sebah, contributed by Robert G. Wilson v, Aug 22 2002
Added a(17)-a(18) computed by Tomás Oliveira e Silva and link to his web site. - M. F. Hasler, Dec 18 2008
Definition corrected by Max Alekseyev, Oct 25 2010
a(16) corrected by Dana Jacobsen, Mar 28 2014

A178127 Lesser of twin Ramanujan primes.

Original entry on oeis.org

149, 179, 227, 239, 347, 431, 569, 599, 641, 821, 1019, 1049, 1061, 1427, 1487, 1607, 1787, 1997, 2081, 2129, 2237, 2267, 2657, 2687, 2711, 2789, 2999, 3167, 3257, 3299, 3359, 3527, 3539, 3581, 3671, 3917, 4091, 4127, 4229, 4241, 4337, 4547, 4637, 4649
Offset: 1

Views

Author

Jonathan Sondow, May 20 2010

Keywords

Comments

By definition, a number p is a member if p and p+2 are Ramanujan primes A104272.
Conjecture: For all n > 570, more than 1/4 of the twin prime pairs < n are both Ramanujan primes.
Motivation for the conjecture is in "Ramanujan primes and Bertrand's postulate" Section 7.
Subsequence of A178128.
See A001359 and A104272 for additional comments, links, and references.

Examples

			a(1) = 149 because (149,151) is the 1st pair of twin primes both of which are Ramanujan primes.
11 is not a member even though 11 and 13 are twin primes and 11 is a Ramanujan prime, because 13 is not also a Ramanujan prime.
		

Crossrefs

Cf. A181678 (number of twin Ramanujan prime pairs less than 10^n).

Programs

  • Maple
    n := 1:
    for i from 1 do
        if A104272(i+1) = A104272(i)+2 then
            printf("%d %d\n",n,A104272(i)) ;
            n := n+1 ;
        end if;
    end do: # produces b-file, R. J. Mathar, Sep 21 2017
  • Mathematica
    nn = 1000; R = Table[0, {nn}]; s = 0;
    Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s < nn, R[[s + 1]] = k], {k, Prime[3*nn]}];
    A104272 = R + 1;
    twins1 = Position[A104272 // Differences, 2] // Flatten;
    A104272[[twins1]] (* Jean-François Alcover, Oct 28 2018, after T. D. Noe in A104272 *)
  • Perl
    use ntheory ":all"; my $r = ramanujan_primes(1e5); my @rt = @$r[grep { $r->[$+1]-$r->[$]==2 } 0..$#$r-1]; say "@rt"; # Dana Jacobsen, Sep 06 2015

Formula

{A104272(n): A104272(n+1) = A104272(n)+2}.
a(n) = A190654(2n-1) = A190654(2n) - 2.

A173081 Number of twin prime pairs < 10^n that contain at least one Ramanujan prime (A104272).

Original entry on oeis.org

0, 6, 28, 167, 964, 6305, 45082, 335919, 2605867, 20841010, 170395131
Offset: 1

Views

Author

T. D. Noe, Nov 22 2010

Keywords

Comments

It appears that this gives the number of Ramanujan primes < 10^n that are the lesser prime in a twin prime pair. Equivalently, this sequence also gives the number of Ramanujan primes p with p+2 also prime less than 10^n.
It appears that no upper twin prime is a Ramanujan prime without the corresponding lower twin prime also being a Ramanujan prime.
This is proved in Section 4 of "Ramanujan Primes: Bounds, Runs, Twins, and Gaps".

Crossrefs

Cf. A178128 (Ramanujan primes p such that p+2 is prime), A007508 (number of twin primes pairs < 10^n), A181678 (number of twin Ramanujan primes pairs < 10^n).

Programs

  • Mathematica
    nn=50000; t=Table[0,{nn}]; s=0; Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s
    				

Extensions

a(10)-a(11) from Dana Jacobsen, Apr 29 2015
Showing 1-3 of 3 results.