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

A190874 First differences of A179196, pi(R_(n+1)) - pi(R_n) where R_n is A104272(n).

Original entry on oeis.org

4, 2, 3, 3, 2, 2, 2, 1, 5, 1, 2, 3, 4, 1, 3, 2, 1, 7, 1, 1, 1, 1, 3, 1, 3, 3, 1, 5, 1, 3, 1, 5, 1, 1, 2, 1, 1, 4, 4, 1, 2, 8, 1, 2, 1, 1, 1, 1, 5, 1, 1, 1, 1, 3, 5, 1, 2, 2, 3, 4, 2, 1, 1, 3, 1, 4, 7, 1, 1, 2, 3, 3, 2, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 5, 2, 3
Offset: 1

Views

Author

John W. Nicholson, May 22 2011

Keywords

Comments

The count of primes of the interval (R_n,R_(n+1)] where R_n is A104272(n).
The sequence A182873 is the first difference of Ramanujan primes R_(n+1)- R_n. While each non-Ramanujan prime is bound by Ramanujan primes, the maximal non-Ramanujan prime gap is less than the maximal Ramanujan prime gap, A182873, and the ratio of a(n)/A182873(n) is the average gap size at R_n.
Record terms of n, a(n) are in A202186, A202187. Each record term value of a(n) - 1 is the index m of A168425(m). A202188 is the index of A168425 when A174641(n) = A168425(m), it has repeated values of A202187.
Starting at index n = A191228(A174602(m)) in this sequence, the first instance of a count of m - 1 consecutive 1's is seen.
Limit inferior of a(n) is positive, because there are infinitely many Ramanujan primes and each term of the sequence is >= 1.
Limit superior of a(n)/log(pi(R_n)) is positive infinity. Equivalently, there are infinitely many n > 0 such that pi(R_(n+1)) > pi(R_n) + t log(pi(R_n)), for every t > 0.
For all n > 3, a(n) < n.
a(n) = rho(n+1) - rho(n) using rho(x) as defined in Sondow, Nicholson, Noe.

Examples

			R(4) = 29, the fourth Ramanujan prime, the next Ramanujan prime is a(4) = 3 primes away or R(5) = 41.
		

Crossrefs

Programs

  • Mathematica
    nn = 100;
    R = Table[0, {nn}]; s = 0; Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[sJean-François Alcover, Nov 11 2018, after T. D. Noe in A104272 *)

Formula

a(n) = pi(R_(n+1)) - pi(R_n) or
a(n) = A000720(A104272(n+1)) - A000720(A104272(n)).
a(n) = A179196(n+1) - A179196(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

A191225 Number of Ramanujan primes R_k between triangular numbers T(n-1) < R_k <= T(n).

Original entry on oeis.org

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

Views

Author

John W. Nicholson, May 27 2011

Keywords

Comments

The function eta(x), A191228, returns the greatest value of k of R_k <= x, and where R_k is the k-th Ramanujan prime (A104272).

Examples

			Write the numbers 1, 2, ... in a triangle with n terms in the n-th row; a(n) = number of Ramanujan primes in n-th row.
Triangle begins
1                 (0 Ramanujan primes, eta(1) = 0)
2  3              (1 Ramanujan primes, eta(3) - eta(1) = 1)
4  5  6           (0 Ramanujan primes, eta(6) - eta(3) = 0)
7  8  9  10       (0 Ramanujan primes, eta(10) - eta(6) = 0)
11 12 13 14 15    (1 Ramanujan primes, eta(15) - eta(10) = 1)
16 17 18 19 20 21 (1 Ramanujan primes, eta(21) - eta(15) = 1)
		

Crossrefs

Programs

  • Mathematica
    terms = 100; nn = terms^2; 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;
    eta = Table[Boole[MemberQ[A104272, k]], {k, 1, nn}] // Accumulate;
    T[n_] := n(n+1)/2;
    a[1] = 0; a[n_] := eta[[T[n]]] - eta[[T[n-1]]];
    Array[a, terms] (* Jean-François Alcover, Nov 07 2018, using T. D. Noe's code for A104272 *)
  • Perl
    use ntheory ":all"; sub a191225 { my $n = shift; ramanujan_prime_count( (($n-1)*$n)/2+1, ($n*($n+1))/2 ); } say a191225($) for 1..10; # _Dana Jacobsen, Dec 30 2015

Formula

a(n) = eta(T(n))- eta(T(n-1)).

A191226 First occurrence of number n of Ramanujan primes in A191225.

Original entry on oeis.org

1, 2, 12, 22, 29, 36, 65, 69, 117, 118, 73, 100, 108, 154, 161, 200, 254, 172, 274, 239, 340, 321, 334, 330, 345, 471, 378, 481, 357, 526, 522, 515, 610, 635, 612, 655, 648, 792, 809, 731, 797, 594, 806, 851, 988, 886, 963, 933, 1005, 1111, 927, 1124, 970
Offset: 0

Views

Author

John W. Nicholson, May 28 2011

Keywords

Crossrefs

A191227 Last known occurrence of number n of Ramanujan primes in A191225.

Original entry on oeis.org

79, 194, 153, 284, 420, 333, 454, 592, 504, 412, 652, 512, 486, 617, 613, 660, 1130, 753, 1002, 849, 1060, 957, 1034, 1037, 1198, 961, 969, 1056, 1368, 1400, 1264, 1314, 1301, 1683, 1510, 1571, 1532, 1625, 1771, 1810, 1745, 1907, 1961, 1877, 1851, 2104, 2097
Offset: 0

Views

Author

John W. Nicholson, May 28 2011

Keywords

Crossrefs

A203555 a(n) is the index m that maximizes R_m / p_(2m).

Original entry on oeis.org

2, 2, 4, 4, 5, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 21, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 45, 45, 46, 47, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68
Offset: 1

Views

Author

John W. Nicholson, Jan 02 2012

Keywords

Comments

The R_n is A104272 and p_n is A000040. The function eta_max allow one to take a value of eta(x) from A191228 and finds a(n). Then one can use A179196 to find the prime index value.
a(n) records on the value of the index, m, when the max value, Max(m>=n,R_m/p_(2*m)) for each n.
The function eta_max(n) can be defined in the following way: With a(n) = m so that eta_max(n) := Max(m>=n,R_m/p_(2*m)) for each n.
Because the ratio R_a(n)/p_{2a(n)} approaches 1 as n approaches infinity, and the absolute max is at a(2), we see that this ratio has local maximums at increasing values of n. This sequence removes the "dips" between the local maximums. The values of a(n) implies, for all i >= n, R_(i+1) < R_a(n)/p_(2*a(n))* R_i. Because of these implications, this sequence can be made into a program finding values of a(n) to a limit L.

Examples

			For m=98, max n>98 (R_m/p_(2*m)) = R_98/p_196 = 1.196144174 < 6/5 = 1.2
For m=99, max n>99 (R_m/p_(2*m)) = R_107/p_214 = 1549/1307 = 1.178070899 < 2^(0.25)
		

Crossrefs

Showing 1-6 of 6 results.