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.

A059111 a(n) = floor(prime(n) - n*log(n)).

Original entry on oeis.org

2, 1, 1, 1, 2, 2, 3, 2, 3, 5, 4, 7, 7, 6, 6, 8, 10, 8, 11, 11, 9, 10, 10, 12, 16, 16, 14, 13, 11, 10, 20, 20, 21, 19, 24, 21, 23, 24, 24, 25, 26, 24, 29, 26, 25, 22, 30, 37, 36, 33, 32, 33, 30, 35, 36, 37, 38, 35, 36, 35, 32, 37, 45, 44, 41, 40, 49, 50, 54, 51, 50, 51, 53, 54, 55
Offset: 1

Views

Author

Henry Bottomley, Jan 04 2001

Keywords

Crossrefs

Programs

  • Magma
    [ Floor(NthPrime(n)-n*Log(n)): n in [1..75] ];  // Bruno Berselli, May 02 2011
  • Mathematica
    Table[Floor[Prime[n]-n Log[n]],{n,100}] (* Harvey P. Dale, May 02 2011 *)
  • PARI
    { default(realprecision, 100); for (n = 1, 1000, write("b059111.txt", n, " ", floor(prime(n) - n*log(n))); ) } \\ Harry J. Smith, Jun 25 2009
    

Extensions

Definition corrected by Harry J. Smith, Jun 24 2009

A064659 a(n) = round(prime(n) - n*log(n)).

Original entry on oeis.org

2, 2, 2, 1, 3, 2, 3, 2, 3, 6, 5, 7, 8, 6, 6, 9, 11, 9, 11, 11, 9, 11, 11, 13, 17, 16, 14, 14, 11, 11, 21, 20, 22, 19, 25, 22, 23, 25, 24, 25, 27, 24, 29, 26, 26, 23, 30, 37, 36, 33, 32, 34, 31, 36, 37, 38, 39, 35, 36, 35, 32, 37, 46, 45, 42, 40, 49, 50, 55
Offset: 1

Views

Author

N. J. A. Sloane, Oct 10 2001

Keywords

Crossrefs

Programs

  • PARI
    { default(realprecision, 100); for (n = 1, 1000, write("b064659.txt", n, " ", round(prime(n) - n*log(n))); ) } \\ Harry J. Smith, Jun 25 2009

Formula

a(n) ~ n*log(log(n)) * (1 + 1/log(n) - 1/log(log(n)) - 2/(log(n)*log(log(n)))). - Vaclav Kotesovec, May 23 2020

A272231 a(n) = round(n / pi(n)), where pi(n) is the prime-counting function.

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 3, 4, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Offset: 2

Views

Author

Benjamin Przybocki, Apr 22 2016

Keywords

Comments

This sequence grows slowly; a(n) reaches 10 at n = 39017.

Crossrefs

Programs

Formula

a(n) = round(n / pi(n)).
a(n) ~ log(n). - Charles R Greathouse IV, Apr 30 2016

A204325 Residual of an asymptotic formula for the n-th prime: a(n) = floor(prime(n)-n*log(n) + n - n*log(log(n)) - (n/log(n))*(log(log(n)) - 2) + (log(log(n)) - 6)*n*log(log(n))/(2*log(n)^2)).

Original entry on oeis.org

16, 8, 7, 7, 6, 7, 5, 6, 8, 6, 9, 9, 7, 6, 8, 10, 8, 9, 9, 6, 8, 7, 8, 11, 11, 8, 7, 4, 3, 12, 11, 12, 9, 14, 10, 11, 12, 11, 11, 12, 9, 13, 10, 8, 5, 11, 18, 16, 12, 11, 11, 8, 12, 12, 12, 13, 9, 9, 7, 4, 8, 16, 14, 10, 8, 16, 16, 20, 16
Offset: 2

Views

Author

Keywords

Comments

prime(n) ~ n*log(n) + n - n*log(log(n)) - (n/log(n))*(log(log(n)) - 2) + (log(log(n)) - 6)*n*log(log(n))/(2*log(n)^2).
The first negative term is a(214) = -2. - Jason Yuen, Feb 17 2025

References

  • M. Cipolla, La determinazione asintotica dell'n-mo numero primo, Rend. d. R. Acc. di sc. fis. e mat. di Napoli, s. 3, VIII (1902), pp. 132-166.

Crossrefs

Programs

  • Mathematica
    Table[Floor[Prime[n]-n*Log[n]+n-n*Log[Log[n]]- (n/Log[n]) (Log[Log[n]]-2)+(Log[Log[n]]-6)*n*Log[Log[n]]/(2*Log[n]^2)],{n,2,100}]
  • PARI
    a(n) = floor(prime(n)-n*log(n) + n - n*log(log(n)) - (n/log(n))*(log(log(n)) - 2) + (log(log(n)) - 6)*n*log(log(n))/(2*log(n)^2)); \\ Michel Marcus, Feb 22 2025

A204594 Nearest integer to n*log(n) + n*log(log(n)) - n + n/log(n)*(log(log(n))-2) - n*log(log(n))*(log(log(n))-6)/(2 log(n)^2), an asymptotic expression for prime(n).

Original entry on oeis.org

-13, -4, 0, 3, 6, 10, 13, 17, 20, 24, 28, 32, 36, 40, 44, 49, 53, 57, 62, 66, 71, 76, 80, 85, 90, 95, 100, 105, 109, 115, 120, 125, 130, 135, 140, 145, 151, 156, 161, 167, 172, 177, 183, 188, 194, 199, 205, 210, 216, 222, 227, 233, 239, 244, 250, 256, 262
Offset: 2

Views

Author

M. F. Hasler, Feb 07 2012

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Round[n Log[n] + n Log[Log[n]] - n + n/Log[n](Log[Log[n]] - 2) - n Log[Log[n]](Log[Log[n]] - 6)/(2 Log[n]^2)], {n, 2, 58}] (* Alonso del Arte, Feb 07 2012 *)
  • PARI
    A204594(n)=round(n*log(n)+n*log(log(n))-n+n/log(n)*(log(log(n))-2)-n*log(log(n))/2/log(n)^2*(log(log(n))-6))

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