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.

Previous Showing 11-13 of 13 results.

A250621 a(n) = floor(n*log(prime(n))).

Original entry on oeis.org

0, 2, 4, 7, 11, 15, 19, 23, 28, 33, 37, 43, 48, 52, 57, 63, 69, 73, 79, 85, 90, 96, 101, 107, 114, 119, 125, 130, 136, 141, 150, 156, 162, 167, 175, 180, 187, 193, 199, 206, 212, 218, 225, 231, 237, 243, 251, 259, 265, 271, 278, 284, 290, 298, 305, 312, 318, 324, 331
Offset: 1

Views

Author

Freimut Marschner, Nov 26 2014

Keywords

Comments

From n < prime(n), n >= 1 follows that n*log(n) < prime(n) < n*log(prime(n)), n >= 4. This inequality is included in the prime number theorem PNT.

Examples

			For n = 1, prime(1) = 2, floor(1*0.69... = 0.69...) = 0 ;
For n = 25, prime(25) = 97, floor(25*4.57... = 114.36...) = 114.
		

Crossrefs

Cf. A050504 (floor(n*log(n))), A086861 (floor(prime(n)/log(prime(n)))), A085581 (floor(prime(n)/log(n))), A050504 (integer part of n*log(n)), A050503 (nearest integer to n*log(n)), A050502 (ceiling of n*log(n)).

Programs

  • Mathematica
    Table[Floor[n Log[Prime[n]]],{n,60}] (* Harvey P. Dale, Aug 13 2019 *)
  • PARI
    vector(100,n,floor(n*log(prime(n)))) \\ Derek Orr, Nov 28 2014

A066026 a(n) = ceiling(log(n!)).

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 9, 11, 13, 16, 18, 20, 23, 26, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 59, 62, 65, 68, 72, 75, 79, 82, 86, 89, 93, 96, 100, 103, 107, 111, 115, 118, 122, 126, 130, 133, 137, 141, 145, 149, 153, 157, 161, 165, 169, 173, 177, 181, 185, 189, 193, 197, 202
Offset: 1

Views

Author

Robert A. Stump (bee_ess107(AT)yahoo.com), Dec 11 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Ceiling[Log[Range[70]!]] (* Harvey P. Dale, Jul 23 2012 *)
  • PARI
    { for (n=1, 1000, a=ceil(log(n!)); write("b066026.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 07 2009
    
  • PARI
    a(n) = ceil(lngamma(n+1)) \\ Michel Marcus, Jun 29 2015

Extensions

Terms a(51)-a(63) from Harry J. Smith, Nov 07 2009

A250623 a(n) = floor(n*log(prime(n))) + ceiling(n*log(n)) - 2*prime(n).

Original entry on oeis.org

-4, -2, -2, -1, -2, 0, -1, 2, 2, -1, 2, -1, 0, 3, 4, 2, 0, 4, 1, 3, 8, 7, 8, 6, 1, 2, 8, 10, 16, 18, 3, 5, 4, 9, 2, 8, 7, 6, 8, 8, 7, 13, 5, 12, 15, 22, 10, -1, 2, 9, 13, 12, 19, 12, 12, 12, 11, 18, 18, 22, 29, 22, 8, 12, 19, 23, 8, 8, 2, 9, 13, 13, 11, 11, 11
Offset: 1

Views

Author

Freimut Marschner, Dec 02 2014

Keywords

Comments

It is known that n*log(n) < prime(n) < n*prime(n), n >= 4. The arithmetic mean of the limits of this inequality is f(n) = (floor((n*log(n)) + ceiling(n*prime(n))))/2. So a(n) is the difference between twice this quantity and 2*prime(n).

Examples

			a(4) = floor(4*log(7)) + ceiling(4*log(4)) - 2*7 = floor(7.78...) + ceiling(5.54...) - 14 = 7 + 6 - 14 = -1;
a(6) = floor(6*log(13)) + ceiling(6*log(6)) - 2*13 = floor(15.38...) + ceiling(10.75..) - 26 = 15 + 11 - 26 = 0.
		

Programs

  • Mathematica
    a250623[n_] :=
    Floor[#*Log[Prime[#]]] + Ceiling[#*Log[#]] - 2*Prime[#] & /@ Range[n]; a250623[137] (* Michael De Vlieger, Dec 26 2014 *)
  • PARI
    vector(100,n,floor(n*log(prime(n)))+ceil(n*log(n))-2*prime(n)) \\ Derek Orr, Dec 30 2014

Formula

a(n) = A250621(n) + A050502(n) - 2*A000040(n).
Previous Showing 11-13 of 13 results.