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.

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

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

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

Showing 1-3 of 3 results.