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.

A058290 Rounded difference between 10^n/(log(10^n) - A) and pi(10^n), where A is Legendre's constant and pi is the prime counting function.

Original entry on oeis.org

-1, 4, 3, 4, 2, -4, 45, 561, 6549, 69985, 690493, 6545056, 60615397, 555560046, 5070271362, 46223804313, 421692578206, 3853431791690, 35289854434775, 323979090116197, 2981921009910364, 27516571651291205, 254562416350667928
Offset: 0

Views

Author

Robert G. Wilson v, Dec 07 2000

Keywords

Comments

Legendre's constant is 1.08366 (A228211). - Alonso del Arte, Nov 02 2013
This sequence has historical rather than mathematical interest, cf. A228211. It is better to use 1 + 1/log(10^n) instead of A. Since A is given to only 5 decimal places, it does not make much sense to compute terms of this sequence beyond n ~ 10. For n = 9, the error a(9)/A006880(9) is about 0.14%, while the error for 1 + 1/log(10^9) instead of A is only about 0.04%. - M. F. Hasler, Dec 03 2018

References

  • Jan Gullberg, "Mathematics, From the Birth of Numbers", W. W. Norton and Company, NY and London, 1997, page 81.

Crossrefs

Programs

  • Mathematica
    Table[ Round[ 10^n /(Log[10^n] - 1.08366) - PrimePi[10^n] ], {n, 0, 13} ]
  • PARI
    {A006880_vec = [0, 4, 25, 168, 1229, 9592, 78498, 664579, 5761455, 50847534, 455052511 4118054813, 37607912018, 346065536839, 3204941750802, 29844570422669, 279238341033925, 2623557157654233, 24739954287740860, 234057667276344607, 2220819602560918840, 21127269486018731928, 201467286689315906290, 1925320391606803968923]} \\ Edited by M. F. Hasler, Dec 03 2018
    {default(realprecision, 100); t=log(10); for (n=0, 23, write("b058290.txt", n, " ", round(10^n/(n*t - 1.08366)) - A006880_vec[n+1]))} \\ Harry J. Smith, Jun 22 2009
    
  • PARI
    A058290(n)={10^n\/(n*log(10)-1.08366)-A006880(n)} \\ with A006880(n)=primepi(10^n) and/or precomputed values for n > 10. - M. F. Hasler, Dec 03 2018

Formula

a(n) = round(10^n/(log(10^n) - 1.08366)) - A006880(n). - M. F. Hasler, Dec 03 2018

Extensions

More terms from Harry J. Smith, Jun 22 2009

A193257 Floor((10^n)/(log(10^n) - 1)).

Original entry on oeis.org

7, 27, 169, 1217, 9512, 78030, 661458, 5740303, 50701542, 454011971, 4110416300, 37550193649, 345618860220, 3201414635780, 29816233849000, 279007258230819, 2621647966812031, 24723998785919976, 233922961602470390, 2219671974013732243
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jul 19 2011

Keywords

Comments

lim n -> infinity (log(n) - n/pi(n)) = 1, where pi(n) is the prime counting function.

Examples

			a(2) = 27 because (10^2)/(log(10^2) - 1) = 27.7379415786....
		

References

  • A. M. Legendre, Essai sur la Théorie des Nombres, Paris: Duprat, 1808.

Crossrefs

Another version of A226744.

Programs

  • Magma
    [Floor(10^n/(Log(10^n)-1)) : n in [1..20]]
    
  • Mathematica
    Table[Floor[10^n/(Log[10^n] - 1)], {n, 20}]
  • PARI
    for(n=1, 20, print1(floor(10^n/(log(10^n)-1)), ", "))
    
  • PARI
    a(n)=10^n\(n*log(10)-1) \\ Charles R Greathouse IV, Jul 30 2011

Formula

a(n) = floor((10^n)/(log(10^n) - 1)).

A226744 Round((10^n)/(log(10^n) - 1)).

Original entry on oeis.org

8, 28, 169, 1218, 9512, 78030, 661459, 5740304, 50701542, 454011971, 4110416301, 37550193650, 345618860221, 3201414635781, 29816233849001, 279007258230820, 2621647966812031, 24723998785919976, 233922961602470391, 2219671974013732243
Offset: 1

Views

Author

Arkadiusz Wesolowski, Aug 31 2013

Keywords

Examples

			a(2) = 28 because (10^2)/(log(10^2) - 1) = 27.7379415786....
		

References

  • A. M. Legendre, Essai sur la Théorie des Nombres, Paris: Duprat, 1808.

Crossrefs

Another version of A193257.

Programs

  • Mathematica
    Table[Round[10^n/(Log[10^n] - 1)], {n, 20}]
  • PARI
    for(n=1, 20, print1(round(10^n/(log(10^n)-1)), ", "));

Formula

a(n) = round((10^n)/(log(10^n) - 1)).

A135325 Smallest n such that pi(n)=Floor[n/log((n-pi(n))/e)].

Original entry on oeis.org

59473, 59671, 59699, 59707, 59729, 59743, 59747, 59755, 59771, 59779, 59791, 59799, 59810, 152993, 153001, 155801, 155809, 155821, 155833, 155849, 155853, 155877, 155889, 155913, 155925, 210533, 211891, 211933, 211943, 211949, 211969
Offset: 1

Views

Author

Manuel Valdivia, Dec 07 2007

Keywords

Crossrefs

Programs

  • Mathematica
    j=0;Do[k=Floor[n/Log[(n-PrimePi[n])/E]];If[PrimePi[n]==k&&k>j,Print[n];j=k],{n,1,10^7,1}]
Showing 1-4 of 4 results.