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-9 of 9 results.

A202187 Index of A190874 at record terms.

Original entry on oeis.org

1, 9, 18, 42, 165, 317, 559, 634, 2604, 7421, 9401, 20760, 86376, 178008, 3549196, 3840921, 5633768, 16454380, 28751054
Offset: 1

Views

Author

John W. Nicholson, Dec 14 2011

Keywords

Comments

Each term of A174641 corresponds with a term in A168425 such that if A174641(A202186(n) - 1) = A168425(m) then m of A168425 = n of a(n). Note that A202186(n) - 1 is the value of the index n of A174641.
Same as A202188, but without repeats.

Examples

			With n = 4, a(4)=42, and A202186(4) = 8. So, A190874(42)=8.
However, A174641(A202186(4)-1) = A174641(8-1) = A168425(a(4)) = A168425(42) = 509.
		

Extensions

a(12)-a(19) added by John W. Nicholson, Jan 06 2014

A202186 Record term value of A190874.

Original entry on oeis.org

4, 5, 7, 8, 10, 11, 14, 16, 21, 24, 29, 37, 40, 48, 50, 51, 65, 66, 68
Offset: 1

Views

Author

John W. Nicholson, Dec 13 2011

Keywords

Comments

a(n) = A190874(n) at record term. For index of record term, see A202187.
Each term of A174641 corresponds with a term in A168425 such that if A174641(a(n) - 1) = A168425(m) then m of A168425 = n of A202187. Note that a(n) - 1 is the value of the index n of A174641.

Examples

			With n = 4, A202187(4)=42, and a(4) = 8. So, A190874(42)=8. However,
A174641(a(4)-1) = A174641(8-1) = A168425(A202187(4)) = A168425(42) = 509.
		

Extensions

a(19) from John W. Nicholson, Jan 06 2014

A234298 Ramanujan prime R_k such that pi(R_(k+1)) - pi(R_k) are record values: record Ramanujan prime A190874(k).

Original entry on oeis.org

2, 71, 181, 503, 2531, 5273, 9887, 11587, 55339, 174917, 225961, 534883, 2492311, 5409337, 130449773, 141833603, 212583797, 658046911, 1183597123, 2897211971, 5602581277, 46992178547, 70637059291, 158465541049, 182591976709, 339683208863
Offset: 1

Views

Author

John W. Nicholson, Dec 22 2013

Keywords

Comments

These are the primes preceding the unique values of A174641. That sequence is the start of a run of non-Ramanujan primes, so the previous prime is the Ramanujan prime. - Dana Jacobsen, Jul 14 2016

Crossrefs

Record values are in A202186, index of A190874 at record terms in A202187, A202188 is the index of A168425 when A174641(n) = A168425(m); A202188(n) = m. A202187 is also the index of a(n).

Programs

  • Perl
    perl -Mntheory=:all -nE 'my $n = $1 if /(\d+)$/; say ++$x," ",prev_prime($n) unless $seen{$n}++;' b174641.txt  # Dana Jacobsen, Jul 14 2016
    
  • Perl
    use ntheory ":all"; my($max,$r)=(0,ramanujan_primes(1e7)); for (0..$#$r-1) { my $d=prime_count($r->[$+1])-prime_count($r->[$]); if ($d > $max) { say $r->[$]; $max=$d; } } # _Dana Jacobsen, Jul 14 2016

Extensions

a(20) to a(26) from Dana Jacobsen, Jul 14 2016

A168421 Small Associated Ramanujan Prime, p_(i-n).

Original entry on oeis.org

2, 7, 11, 17, 23, 29, 31, 37, 37, 53, 53, 59, 67, 79, 79, 89, 97, 97, 127, 127, 127, 127, 127, 137, 137, 149, 157, 157, 179, 179, 191, 191, 211, 211, 211, 223, 223, 223, 233, 251, 251, 257, 293, 293, 307, 307, 307, 307, 307, 331, 331, 331
Offset: 1

Views

Author

John W. Nicholson, Nov 25 2009

Keywords

Comments

a(n) is the smallest prime p_(k+1-n) on the left side of the Ramanujan Prime Corollary, 2*p_(i-n) > p_i for i > k, where the n-th Ramanujan Prime R_n is the k-th prime p_k. [Comment clarified and shortened by Jonathan Sondow, Dec 20 2013]
Smallest prime number, a(n), such that if x >= a(n), then there are at least n primes between x and 2x exclusively.
This is very useful in showing the number of primes in the range [p_k, 2*p_(i-n)] is greater than or equal to 1. By taking into account the size of the gaps between primes in [p_(i-n),p_k], one can see that the average prime gap is about log(p_k) using the following R_n / (2*n) ~ log(R_n).
Proof of Corollary: See Wikipedia link
The number of primes until the next Ramanujan prime, R_(n+1), can be found in A190874.
Not the same as A124136.
A084140(n) is the smallest integer where ceiling ((A104272(n)+1)/2), a(n) is the next prime after A084140(n). - John W. Nicholson, Oct 09 2013
If a(n) is in A005382(k) then A005383(k) is a twin prime with the Ramanujan prime, A104272(n) = A005383(k) - 2, and A005383(k) = A168425(n). If this sequence has an infinite number of terms in A005382, then the twin prime conjecture can be proved. - John W. Nicholson, Dec 05 2013
Except for A000101(1)=3 and A000101(2)=5, A000101(k) = a(n). Because of the large size of a gap, there are many repeats of the prime number in this sequence. - John W. Nicholson, Dec 10 2013
For some n and k, we see that a(n) = A104272(k) as to form a chain of primes similar to a Cunningham chain. For example (and the first example), a(2) = 7, links A104272(2) = 11 = a(3), links A104272(3) = 17 = a(4), links A104272(4) = 29 = a(6), links A104272(6) = 47. Note that the links do not have to be of a form like q = 2*p+1 or q = 2*p-1. - John W. Nicholson, Dec 14 2013
Srinivasan's Lemma (2014): p_(k-n) < (p_k)/2 if R_n = p_k and n > 1. Proof: By the minimality of R_n, the interval ((p_k)/2,p_k] contains exactly n primes, so p_(k-n) < (p_k)/2. - Jonathan Sondow, May 10 2014
In spite of the name Small Associated Ramanujan Prime, a(n) is not a Ramanujan prime for many values of n. - Jonathan Sondow, May 10 2014
Prime index of a(n), pi(a(n)) = i-n, is equal to A179196(n) - n + 1. - John W. Nicholson, Sep 15 2015
All maximal prime pairs in A002386 and A000101 are bounded by, for a particular n and i, the prime A104272(n) and twice a prime in A000040() following a(n). This means the gap between maximal prime pair cannot be more than twice the prior maximal prime gap. - John W. Nicholson, Feb 07 2019

Examples

			For n=10, the n-th Ramanujan prime is A104272(n)= 97, the value of k = 25, so i is >= 26, i-n >= 16, the i-n prime is 53, and 2*53 = 106. This leaves the range [97, 106] for the 26th prime which is 101. In this example, 53 is the small associated Ramanujan prime.
		

Crossrefs

Cf. A165959 (range size), A230147 (records).

Programs

Formula

a(n) = prime(primepi(A104272(n)) + 1 - n).
a(n) = nextprime(A084139(n+1)), where nextprime(x) is the next prime > x. Note: some A084139(n) may be prime, therefore nextprime(x) not equal to x. - John W. Nicholson, Oct 11 2013
a(n) = nextprime(A084140(n)). - John W. Nicholson, Oct 11 2013

Extensions

Extended by T. D. Noe, Nov 22 2010

A168425 Large Associated Ramanujan Prime, p_i.

Original entry on oeis.org

3, 13, 19, 31, 43, 53, 61, 71, 73, 101, 103, 109, 131, 151, 157, 173, 181, 191, 229, 233, 239, 241, 251, 269, 271, 283, 311, 313, 349, 353, 373, 379, 409, 419, 421, 433, 439, 443, 463, 491, 499, 509, 571, 577, 593, 599, 601, 607, 613, 643, 647, 653, 659, 661
Offset: 1

Views

Author

John W. Nicholson, Nov 25 2009

Keywords

Comments

a(n) is the smallest prime on the right side of the Ramanujan Prime Corollary, 2*p_(i-n) > p_i, for i > k where k = pi(p_k) = pi(R_n) That is, p_k is the n-th Ramanujan Prime, R_n and the k-th prime.
a(n) = nextprime(R_n) = nextprime(p_k), where nextprime(x) is the next prime larger than x.
This is very useful in showing the number of primes in the range [p_k, 2*p_(i-n)] is greater than or equal to 1. By taking into account the size of the gaps between primes in [p_(i-n),p_k], one can see that the average prime gap is about log(p_k) using the following R_n / (2*n) ~ log(R_n).
Proof of Corollary: See Wikipedia link.
The number of primes until the next Ramanujan prime, R_(n+1), can be found in A190874.
Srinivasan's Lemma (2014): p_(k-n) < (p_k)/2 if R_n = p_k and n > 1. Proof: By the minimality of R_n, the interval ((p_k)/2,p_k] contains exactly n primes, so p_(k-n) < (p_k)/2. - Jonathan Sondow, May 10 2014
In spite of the name Large Associated Ramanujan Prime, a(n) is not a Ramanujan prime for many values of n. - Jonathan Sondow, May 10 2014

Examples

			For n=10, the n-th Ramanujan prime is A104272(n)= 97, the value of k = 25, so i is >= 26, i-n >= 16, the i-n prime is 53, and 2*53 = 106. This leaves the range [97, 106] for the 26th prime which is 101. In this example, 101 is the large associated Ramanujan prime.
		

Crossrefs

Programs

  • Mathematica
    nn = 100; 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]}
    ];
    RamanujanPrimes = R + 1;
    Prime[PrimePi[#]+1]& /@ RamanujanPrimes (* Jean-François Alcover, Nov 03 2018, after T. D. Noe in A104272 *)
  • PARI
    genit(n=100)={my(L=vector(n),s=0,k=1,z);for(k=1,prime(3*n)-1,if(ispseudoprime(k),s++);if(k%2==0&&ispseudoprime(k/2),s--);if(snextprime(x+1),L);v} \\ Bill McEachen, Jun 24 2023 (incorporates code from A104272)
  • Perl
    use ntheory ":all"; say next_prime(nth_ramanujan_prime($)) for 1..100; # _Dana Jacobsen, Dec 25 2015
    

Formula

a(n) = prime(primepi(A104272(n)) + 1).
a(n) = A151800(A104272(n)). - Michel Marcus, Jun 27 2023

A182873 First differences of the Ramanujan primes, A104272.

Original entry on oeis.org

9, 6, 12, 12, 6, 12, 8, 4, 26, 4, 6, 20, 22, 2, 16, 12, 2, 46, 2, 4, 6, 2, 22, 6, 12, 26, 4, 36, 2, 18, 6, 28, 8, 10, 12, 2, 6, 22, 26, 4, 12, 66, 2, 16, 6, 6, 2, 6, 34, 2, 4, 6, 6, 18, 42, 8, 12, 12, 18, 40, 12, 2, 4, 26, 4, 24, 56, 4, 6, 20, 16, 26, 10, 2
Offset: 1

Views

Author

T. D. Noe, Dec 09 2010

Keywords

Comments

That is, the gaps between adjacent Ramanujan primes.

Crossrefs

Cf. A190874.
Cf. A001223 (differences between primes).

A165959 Size of the range of the Ramanujan Prime Corollary, 2*A168421(n) - A104272(n).

Original entry on oeis.org

2, 3, 5, 5, 5, 11, 3, 7, 3, 9, 5, 11, 7, 9, 7, 11, 15, 13, 27, 25, 21, 15, 13, 11, 5, 17, 7, 3, 11, 9, 15, 9, 21, 13, 3, 15, 13, 7, 5, 15, 11, 11, 17, 15, 27, 21, 15, 13, 7, 21, 19, 15, 9, 3, 17, 15, 7, 7, 7, 9, 9, 17, 15, 11, 9, 5, 5, 21, 17, 11, 7, 15, 9
Offset: 1

Views

Author

John W. Nicholson, Sep 12 2011

Keywords

Comments

All but the first term is odd because A104272 has only one even term, 2. Because of all primes > 2 are odd, 1 can be subtracted from each term.
If this sequence has an infinite number of terms in which a(n) = 3, then the twin prime conjecture can be proved.
R_n is the sequence A104272(n) and k = pi(R_n)= A000720(R_n) with i>k.
By comparing the fractions we can see that (p_(i+1)-p_i)/(2*sqrt(p_i)) and a(n)/(2*sqrt(p_k)) are < 1 for all n > 0, in fact a(n)/(1.8*sqrt(p_k)) < 1 for all n > 0. When taking into account numbers in A182873(n) and A190874(n) to sqrt(R_n) we see that A182873(n)/(A190874(n)*sqrt(R_n)) < 1 for all n > 1.

Examples

			A168421(19) = 127, A104272(19) = 227; so a(19) = 2*A168421(19) - A104272(19) = 254 - 227 = 27. Note: for n = 20, 21, 22, 23, A168421(n) = 127. Because A168421 remains the same for these n and A104272 increases, the size of the range for a(n) for these n decreases. Note: a(18) = 2*97 - 181 = 194 - 181 = 13. This is nearly half a(19). The actual gap betweens A104272(19) and the next prime, 229, is 2.
		

Crossrefs

Programs

  • Mathematica
    nn = 100; 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; t = Table[0, {nn}];
    Do[m = PrimePi[2 n] - PrimePi[n]; If[0 < m <= nn, t[[m]] = n], {n, 15 nn}];
    A168421 = NextPrime[Join[{1}, t]] // Most;
    A165979 = 2 A168421 - A104272 (* Jean-François Alcover, Nov 07 2018, after T. D. Noe in A104272 *)

Formula

a(n) = 2*A168421(n) - A104272(n).

A174602 Smallest prime that begins a run of n Ramanujan primes that are consecutive primes.

Original entry on oeis.org

2, 67, 227, 227, 227, 2657, 2657, 2657, 2657, 2657, 2657, 2657, 2657, 562871, 793487, 809707, 809707, 984241, 984241, 984241, 6234619, 11652013, 41662651, 41662651, 41662651, 94653397, 383825567, 869730887, 953913871, 953913871, 953913871
Offset: 1

Views

Author

T. D. Noe, Nov 29 2010

Keywords

Comments

The first run of 13 consecutive Ramanujan primes was mentioned by Sondow.
Starting at index m = A191228(a(n)) in A190874(m), the first instance of a count of n - 1 consecutive 1's is seen. - John W. Nicholson, Dec 15 2011

Examples

			67 and 71 are the first two Ramanujan primes that are consecutive primes, so a(2) = 67.
		

Crossrefs

Cf. A104272 (Ramanujan primes), A174641 (runs of non-Ramanujan primes).

Programs

  • Mathematica
    nn=10000; t=Table[0, {nn}]; len=Prime[3*nn]; s=0; Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s
    				
  • Perl
    use ntheory ":all"; my $r=ramanujan_primes(1e8); my $max = 0; for (0..$#$r-2) { my $k=0; $k++ while next_prime($r->[$+$k]) == $r->[$+$k+1]; say ++$max," ",$r->[$] while $k >= $max; } # _Dana Jacobsen, Jul 14 2016

A191228 Greatest Ramanujan prime index less than x, eta(x).

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10
Offset: 1

Views

Author

John W. Nicholson, May 28 2011

Keywords

Comments

a(n) is the greatest value k of A104272(k) less than x. The integer inverse function of A104272.
Starting at index m = a(A174602(n)) in A190874(m), the first instance of a count of n - 1 consecutive 1's is seen.

Examples

			a(17) = eta(17) = 3. Or, R_3 = 17.
		

Crossrefs

Programs

  • Mathematica
    nn = 100; 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;
    Table[Boole[MemberQ[A104272, k]], {k, 1, 100}] // Accumulate (* Jean-François Alcover, Nov 07 2018, using T. D. Noe's code for A104272 *)
Showing 1-9 of 9 results.