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-4 of 4 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

A248911 a(n) = floor( prime(n) - (n+1)*log(n) ).

Original entry on oeis.org

2, 0, 0, 0, 1, 0, 1, 0, 1, 3, 2, 4, 5, 3, 3, 5, 8, 6, 8, 8, 6, 7, 7, 9, 13, 13, 10, 10, 7, 7, 17, 16, 18, 15, 21, 18, 19, 21, 20, 21, 23, 20, 25, 22, 21, 19, 26, 33, 32, 29, 28, 29, 26, 31, 32, 33, 34, 31, 32, 31, 28, 32, 41, 40, 37, 36, 45, 45, 50, 47, 46, 46
Offset: 1

Views

Author

Michel Lagneau, Oct 16 2014

Keywords

Comments

The function log gives the natural logarithm (to base e).
See A059111 for the sequence a(n) = floor(prime(n)-n*log(n)).

Examples

			a(8) = 0 because floor(prime(8)-(8+1)*log(8)) = floor(19 -9*2.07944154...) = floor(.28502612...) = 0.
		

Crossrefs

Programs

  • Magma
    [Floor(NthPrime(n)-(n+1)*Log(n)): n in [1..80]]; // Vincenzo Librandi, Oct 16 2014
  • Maple
    with(numtheory):
    for n from 1 to 200 do:
      p:=floor(evalf(ithprime(n)-(n+1)*ln(n))): printf(`%d, `,p):
    od:
  • Mathematica
    Table[Floor[Prime[n]-(n+1)Log[n]], {n, 100}]

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

A248912 a(n) = floor(prime(n) - (n+1)*(log(n) + log(log(n))) + n) for n > 1.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, Oct 16 2014

Keywords

Comments

The function log gives the natural logarithm (to base e).
a(30) = -1 is the unique negative value.
See A059112 for floor( prime(n) - n*log(n) - n*log(log(n)) + n ) where prime(n) is the n-th prime.

Examples

			a(8) = 1 because floor(prime(8)-(8+1)*(log(8)+log(log(8))) + 8) = floor(19-9*(2.0794415...+0.7320993...) + 8) = floor(1.6961318...) = 1.
		

Crossrefs

Programs

  • Magma
    [Floor(NthPrime(n)-(n+1)*(Log(n)+Log(Log(n)))+n): n in [2..80]]; // Vincenzo Librandi, Oct 16 2014
    
  • Maple
    with(numtheory):for n from 1 to 200 do:p:=floor(evalf(ithprime(n)-(n+1)*ln(n)- (n+1)*ln(ln(n)) + n)): printf(`%d, `,p):od:
  • Mathematica
    Table[Floor[Prime[n]-(n+1)*(Log[n]+Log[Log[n]])+n], {n,2, 100}]
  • PARI
    a(n) = floor(prime(n)-(n+1)*(log(n)+log(log(n))) + n); \\ Michel Marcus, Mar 05 2022
Showing 1-4 of 4 results.