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

A190881 Exception list of where A190661(n) < A104272(n) for n > 0.

Original entry on oeis.org

43, 45, 68, 93, 145, 341, 655, 3177, 3383, 3424, 4696, 5109, 5116, 5183, 5201, 5225, 7195, 7574
Offset: 1

Views

Author

John W. Nicholson, May 23 2011

Keywords

Comments

a(n) is the value of n of A190661 and A104272 at the exception.

Crossrefs

Extensions

Corrected data for the changed offset and data of A190661 - John W. Nicholson, Nov 20 2013

A066888 Number of primes p between triangular numbers T(n) < p <= T(n+1).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jun 06 2003

Keywords

Comments

It is conjectured that for n > 0, a(n) > 0. See also A190661. - John W. Nicholson, May 18 2011
If the above conjecture is true, then for any k > 1 there is a prime p > k such that p <= (n+1)(n+2)/2, where n = floor(sqrt(2k)+1/2). Ignoring the floor function we can obtain a looser (but nicer) lower bound of p <= 1 + k + 2*sqrt(2k). - Dmitry Kamenetsky, Nov 26 2016

Examples

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

Crossrefs

Cf. A083382.
Essentially the same as A065382 and A090970.

Programs

  • Mathematica
    Table[PrimePi[(n^2 + n)/2] - PrimePi[(n^2 - n)/2], {n, 96}] (* Alonso del Arte, Sep 03 2011 *)
    PrimePi[#[[2]]]-PrimePi[#[[1]]]&/@Partition[Accumulate[Range[0,100]],2,1] (* Harvey P. Dale, Jun 04 2019 *)
  • PARI
    { tp(m)=local(r, t); r=1; for(n=1,m,t=0; for(k=r,n+r-1,if(isprime(k),t++)); print1(t","); r=n+r; ) }
    
  • PARI
    {tpf(m)=local(r, t); r=1; for(n=1,m,t=0; for(k=r,n+r-1,if(isprime(k),t++); print1(k" ")); print1(" ("t" prime)"); print(); r=n+r;) }
    
  • Python
    from sympy import primerange
    def A066888(n): return sum(1 for p in primerange((n*(n+1)>>1)+1,((n+2)*(n+1)>>1)+1)) # Chai Wah Wu, May 22 2025

Formula

a(n) = pi(n*(n+1)/2) - pi(n*(n-1)/2).
a(n) equals the number of occurrences of n+1 in A057062. - Esko Ranta, Jul 29 2011

Extensions

More terms from Vladeta Jovovic and Jason Earls, Jun 06 2003
Offset corrected by Daniel Forgues, Sep 05 2012

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

A088634 Index of the first occurrence of n in A066888.

Original entry on oeis.org

1, 3, 2, 9, 17, 28, 30, 36, 41, 54, 74, 51, 65, 92, 100, 112, 118, 132, 108, 154, 158, 161, 172, 175, 210, 197, 215, 255, 248, 239, 236, 316, 297, 291, 340, 321, 330, 345, 334, 400, 406, 402, 423, 394, 445, 452, 509, 493, 507, 481, 526, 546, 561, 584, 565, 598
Offset: 0

Views

Author

Amarnath Murthy, Oct 26 2003

Keywords

Comments

For all 0 < n < 1000, a(n) < A104272(n). - John W. Nicholson, May 22 2011

Crossrefs

Programs

  • Mathematica
    nn=100; k=0; t=Table[0,{nn}]; cnt=0; While[cntT. D. Noe, May 19 2011 *)

Extensions

More terms from David Wasserman, Aug 16 2005

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

A230147 Record values in A165959.

Original entry on oeis.org

2, 3, 5, 11, 15, 27, 33, 37, 65, 67, 75, 77, 95, 137, 147, 151, 153, 169, 191, 219, 247, 249, 251, 291, 297, 303, 307, 319, 415, 429, 441, 465, 495
Offset: 1

Views

Author

John W. Nicholson, Nov 20 2013

Keywords

Comments

The index value A230146(n) is also the index of A104272(n).
Because of the bounds on a(n), A182873(n), A192820, and A190661, old conjectures about prime numbers may be proved.

Crossrefs

Cf. A230146 = indices of record values of A165959.

Programs

Showing 1-7 of 7 results.