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.

A250622 a(n) = floor(n*log(prime(n)))-prime(n), n >= 1.

Original entry on oeis.org

-2, -1, -1, 0, 0, 2, 2, 4, 5, 4, 6, 6, 7, 9, 10, 10, 10, 12, 12, 14, 17, 17, 18, 18, 17, 18, 22, 23, 27, 28, 23, 25, 25, 28, 26, 29, 30, 30, 32, 33, 33, 37, 34, 38, 40, 44, 40, 36, 38, 42, 45, 45, 49, 47, 48, 49, 49, 53, 54, 57, 61, 59, 53, 56, 60, 63, 57, 58, 56, 60, 63, 64, 64, 65, 66, 69, 70, 69
Offset: 1

Views

Author

Freimut Marschner, Dec 02 2014

Keywords

Comments

Since n*log(prime(n)) > prime(n), n >= 4 and ceiling(prime(n) - n*log(n)) < prime(n), then n*log(n) < prime(n) < n*log(prime(n)), n >= 4. This inequality is included in the prime number theorem PNT. Remark: a(n) >= 0 for n >=4 otherwise a(n) < 0.

Examples

			n = 1, a(1) = floor(1*0.6931...) - 2 = 0 - 2 = -2;
n = 5, a(5) = floor(5*2.3978...) - 11 = floor( 11.9894...) - 11 = 11 - 11 = 0;
n = 6, a(6) = floor(6*2.5649...) - 13 = floor(15.3896...) - 13 = 15 - 13 = 2.
		

Crossrefs

Cf. A000040, A064658 (ceiling(prime(n) - n*log(n))), A250621 (floor(n*log(prime(n)))).

Programs

  • Mathematica
    a250622[n_Integer] := Table[Floor[i*Log[Prime[i]]] - Prime[i], {i, n}]; a250622[121] (* Michael De Vlieger, Dec 11 2014 *)
  • PARI
    vector(100,n,floor(n*log(prime(n))-prime(n))) \\ Derek Orr, Dec 13 2014

Formula

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