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-10 of 16 results. Next

A057809 Numbers k such that pi(k) divides k.

Original entry on oeis.org

2, 4, 6, 8, 27, 30, 33, 96, 100, 120, 330, 335, 340, 350, 355, 360, 1008, 1080, 1092, 1116, 1122, 1128, 1134, 3059, 3066, 3073, 3080, 3087, 3094, 8408, 8424, 8440, 8456, 8464, 8472, 23526, 23535, 24300, 64540, 64580, 64610, 64620, 64650, 64690, 64700
Offset: 1

Views

Author

N. J. A. Sloane, Nov 07 2000

Keywords

Comments

Each cluster of entries is approximately a power of e times larger than the previous cluster.
The sequence is infinite (Golomb, 1962). - Yifan Xie, Jun 23 2025

Examples

			120 is a member as there are exactly 30 primes less than 120 and 30 * 4 = 120.
		

Crossrefs

Apart from initial term same as A058011.

Programs

  • Magma
    [n: n in [2..10^5] | n mod #PrimesUpTo(n) eq 0]; // Vincenzo Librandi, Jul 04 2016
  • Maple
    select(t -> t mod numtheory:-pi(t) = 0, [$2..10^5]); # Robert Israel, Jul 03 2016
  • Mathematica
    Select[ Range[2, 10^5], IntegerQ[ # / PrimePi[ # ]] & ]
    Select[Range[1000], Divisible[#, PrimePi[#]] &] (* Requires version 6.0+. Alonso del Arte, May 24 2015 *)
  • PARI
    is(n)=n%primepi(n)==0 \\ Charles R Greathouse IV, Sep 14 2015
    

Extensions

More terms from James Sellers, Nov 08 2000
a(297)-a(1161) obtained from the values of A038625 computed by Jan Büthe. - Giovanni Resta, Aug 31 2018

A038625 a(n) is smallest number m such that m = n*pi(m), where pi(k) = number of primes <= k (A000720).

Original entry on oeis.org

2, 27, 96, 330, 1008, 3059, 8408, 23526, 64540, 175197, 480852, 1304498, 3523884, 9557955, 25874752, 70115412, 189961182, 514272411, 1394193580, 3779849598, 10246935644, 27788566029, 75370121160, 204475052375, 554805820452, 1505578023621, 4086199301996, 11091501630949
Offset: 2

Views

Author

Keywords

Comments

Golomb shows that solutions exist for each n>1.
Equivalently, for n > 1, least m such that m >= n*pi(m). - Eric M. Schmidt, Aug 05 2014
The values a(26),...,a(50) were calculated with the Eratosthenes sieve making use of strong bounds for pi(x), which follow from partial knowledge of the Riemann hypothesis, and the analytic method for calculating initial values of pi(x). - Jan Büthe, Jan 16 2015

Examples

			pi(3059) = 437 and 3059/437 = 7, so a(7)=3059.
		

Crossrefs

Programs

  • Maple
    with(numtheory); f:=proc(n) local i; for i from 2 to 10000 do if i mod pi(i) = 0 and i/pi(i) = n then RETURN(i); fi; od: RETURN(-1); end; # N. J. A. Sloane, Sep 01 2008
  • Mathematica
    t = {}; k = 2; Do[While[n*PrimePi[k] != k, k++]; AppendTo[t, k], {n, 2, 15}]; t (* Jayanta Basu, Jul 10 2013 *)
  • PARI
    a(n)=my(k=1); while(k!=n*primepi(k),k++); k;
    for (n=2, 20, print1(a(n), ", ")); \\ Derek Orr, Aug 13 2014
    
  • Python
    from math import exp
    from sympy import primepi
    def a(n):
      m = 2 if n == 2 else int(exp(n)) # pi(m) > m/log(m) for m >= 17
      while m != n*primepi(m): m += 1
      return m
    print([a(n) for n in range(2, 10)]) # Michael S. Branicky, Feb 27 2021

Formula

It appears that a(n) is asymptotic to e^2*exp(n). - Chris K. Caldwell, Apr 02 2008
a(n) = A038626(n) * n. - Max Alekseyev, Oct 13 2023

Extensions

Three more terms from Labos Elemer, Sep 12 2003
Edited by N. J. A. Sloane at the suggestion of Chris K. Caldwell, Apr 08 2008
24 terms added and entry a(26) corrected by Jan Büthe, Jan 07 2015

A038623 Smallest prime p such that p/pi(p)>=n.

Original entry on oeis.org

2, 2, 37, 127, 347, 1087, 3109, 8419, 24317, 64553, 175211, 480881, 1304707, 3523901, 9558533, 25874843, 70115473, 189961529, 514272533, 1394193607, 3779851091, 10246935679, 27788566133, 75370121191, 204475052401, 554805820711, 1505578023841, 4086199302113
Offset: 1

Views

Author

Keywords

Examples

			pi(37)=12 and a(3)=37 is the smallest prime >= 3*12.
		

Crossrefs

Essentially the same as A062743,A038607.
a(n) = prime(A038624(n)).

Programs

  • Mathematica
    Prime[Join[{k = 1}, Table[While[Prime[k]/k < n, k++]; k, {n, 2, 18}]]] (* Jayanta Basu, Jul 10 2013 *)
  • PARI
    k=n=1; forprime(p=2,, while(p/k>=n, print1(p", "); n++); k++) \\ Charles R Greathouse IV, Oct 15 2016

Formula

a(n) = exp(n + 1 + o(1)). - Charles R Greathouse IV, Oct 15 2016

Extensions

Edited by N. J. A. Sloane, Jun 30 2008 at the suggestion of R. J. Mathar
a(24)-a(28) from David W. Wilson, Apr 25 2017
a(29)-a(50) obtained from the values of A038625 computed by Jan Büthe. - Giovanni Resta, Sep 01 2018

A038624 Values of pi(x) where x exceeds n * pi(x).

Original entry on oeis.org

1, 1, 12, 31, 69, 181, 443, 1052, 2701, 6455, 15928, 40073, 100362, 251707, 637235, 1617175, 4124437, 10553415, 27066974, 69709680, 179992909, 465769803, 1208198526, 3140421716, 8179002096, 21338685407, 55762149030, 145935689361
Offset: 1

Views

Author

Keywords

Comments

"Exceeds" can be interpreted as ">" or ">=" since the corresponding primes are never multiples of their indices. - R. J. Mathar, Jun 08 2008
Equivalently, a(n) = minimal k such that prime(k)/k >= n. - Enoch Haga, Oct 19 2007
a(n) = A062742(n) = A038606(n) for n >= 3. - Jaroslav Krizek, Dec 13 2009

Examples

			x exceeds 3*pi(x) when pi(x)=12, so a(3)=12
		

Crossrefs

Essentially the same as A062742.
Cf. A038606 (variant).

Programs

  • Mathematica
    Join[{k = 1}, Table[While[Prime[k]/k < n, k++]; k, {n, 2, 18}]] (* Jayanta Basu, Jul 10 2013 *)

Extensions

a(24)-a(28) from Robert G. Wilson v, Sep 26 2005
Edited by N. J. A. Sloane, Jun 30 2008 at the suggestion of R. J. Mathar.
a(29)-a(50) obtained from the values of A038625 computed by Jan Büthe. - Giovanni Resta, Sep 01 2018

A087235 a(n) is the largest number in the set of solutions to n=x/pi(x), where pi(x)=A000720(x).

Original entry on oeis.org

8, 33, 120, 360, 1134, 3094, 8472, 24300, 64720, 175197, 481452, 1304719, 3524654, 9560100, 25874784, 70119985, 189969354, 514278263, 1394199300, 3779856633, 10246936436, 27788573803, 75370126416, 204475055200, 554805820556, 1505578026105, 4086199303004, 11091501633037
Offset: 2

Views

Author

Labos Elemer, Sep 04 2003

Keywords

Examples

			n=22: list of solutions = {10246935644, 10246935842, 10246935864, 10246935974, 10246936106, 10246936128, 10246936370, 10246936436}, so a(22)=10246936436.
		

Crossrefs

Formula

a(n) = Max{x; n*pi(x)=x}.

Extensions

More terms from David Radcliffe, Sep 10 2014
a(29) corrected and a(30)-a(50) obtained from the values of A038625 computed by Jan Büthe. - Giovanni Resta, Sep 01 2018

A102281 a(n) is the largest number m such that m = pi(n*m).

Original entry on oeis.org

4, 11, 30, 72, 189, 442, 1059, 2700, 6472, 15927, 40121, 100363, 251761, 637340, 1617174, 4124705, 10553853, 27067277, 69709965, 179993173, 465769838, 1208198861, 3140421934, 8179002208, 21338685406, 55762149115, 145935689393
Offset: 2

Views

Author

Farideh Firoozbakht, Jan 09 2005; extended Sep 13 2005

Keywords

Comments

All known terms of this sequence satisfy the relation 2.4*a(n) - 12 < a(n+1) < 2.7*a(n) + 1 is true.
a(n) is the largest number m such that floor(prime(m)/m)=n-1. - Farideh Firoozbakht, Sep 13 2005

Examples

			3140421934 = pi(24*3140421934) and 3140421934 is the largest number with this property, so a(24) = 3140421934.
		

Crossrefs

Extensions

a(24) corrected by Max Alekseyev, Jul 18 2011
a(29)-a(50) obtained from the A038625 values computed by Jan Büthe. - Giovanni Resta, Aug 31 2018

A038626 Smallest positive integer m such that m = pi(n*m) = A000720(n*m).

Original entry on oeis.org

1, 9, 24, 66, 168, 437, 1051, 2614, 6454, 15927, 40071, 100346, 251706, 637197, 1617172, 4124436, 10553399, 27066969, 69709679, 179992838, 465769802, 1208198523, 3140421715, 8179002095, 21338685402, 55762149023, 145935689357, 382465573481, 1003652347080, 2636913002890, 6935812012540
Offset: 2

Views

Author

Keywords

Comments

Golomb shows that solutions exist for each n>1.
For all known terms, we have 2.4*a(n) < a(n+1) < 2.7*a(n) + 7. A038627(n) gives number of natural solutions of the equation m = pi(n*m). - Farideh Firoozbakht, Jan 09 2005
a(n) grows as exp(n)/n. Thus, a(n+1)/a(n) tends to e=exp(1) as n grows. - Max Alekseyev, Oct 15 2017

Examples

			pi(3059) = 437 and 3059/437 = 7, so a(7)=437.
		

Crossrefs

Formula

a(n) = limit of f^(k)(1) as k grows, where f(x)=A000720(n*x). Also, a(n) = f^(A293529(n))(1). - Max Alekseyev, Oct 11 2017
a(n) = A038625(n) / n. - Max Alekseyev, Oct 13 2023

Extensions

a(24) from Farideh Firoozbakht, Jan 09 2005
Edited by N. J. A. Sloane at the suggestion of Chris K. Caldwell, Apr 08 2008
a(25)-a(32) from Max Alekseyev, Jul 18 2011, Oct 14 2017
a(33)-a(50) obtained from the values of A038625 computed by Jan Büthe. - Giovanni Resta, Aug 31 2018

A087237 a(n) = (Max{x : n*pi(x) = x} - Min{x : n*pi(x) = x})/n = A087236(n)/n.

Original entry on oeis.org

3, 2, 6, 6, 21, 5, 8, 86, 18, 0, 50, 17, 55, 143, 2, 269, 454, 308, 286, 335, 36, 338, 219, 113, 4, 92, 36, 72, 296, 296, 327, 23, 2, 168, 658, 770, 90, 1274, 1454, 1514, 3259, 612, 6, 2896, 367, 15, 2011, 287, 1915
Offset: 2

Views

Author

Labos Elemer, Sep 04 2003

Keywords

Comments

a(n) is the difference between the largest and smallest solutions to n = x/pi(x), divided by n, where pi(x) = A000720(x).
Equivalently, a(n) is the difference between largest solution and smallest natural solution of the equation pi(n*x) = x. - Farideh Firoozbakht, Jan 09 2005 [Max Alekseyev observes that this is trivially equivalent to the first definition.]

Examples

			n=22: a(22) = (10246936436-10246935644)/22 = 792/22 = 36.
a(2) = 3 because 1, 2, 3 & 4 are all solutions of pi(2*x) = x and 4 - 1 = 3; a(11) = 0 because 15927 is the only solution of the equation pi(11*x) = x and 15927 - 15927 = 0. - _Farideh Firoozbakht_, Jan 09 2005
		

Crossrefs

Programs

  • Mathematica
    MapIndexed[(Last@ #1 - First@ #1)/(First@ #2 + 1) &, Values@ Rest@ KeySort@ PositionIndex@ Table[n/PrimePi[n] /. k_ /; Not@ IntegerQ@ k -> 0, {n, 2, 10^6}]] (* Michael De Vlieger, Mar 25 2017, Version 10 *)

Formula

a(n) = A102281(n) - A038626(n). - Farideh Firoozbakht, Jan 09 2005

Extensions

Edited by N. J. A. Sloane, Oct 28 2008 at the suggestion of R. J. Mathar
24 additional terms from Jan Büthe, Jan 16 2015

A057810 Quotients n/pi(n) for n in A057809.

Original entry on oeis.org

2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13
Offset: 1

Views

Author

N. J. A. Sloane, Nov 07 2000

Keywords

Crossrefs

Programs

Extensions

More terms from Naohiro Nomoto, Jun 26 2001

A087240 First differences of A087235.

Original entry on oeis.org

25, 87, 240, 774, 1960, 5378, 15828, 40420, 110477, 306255, 823267, 2219935, 6035446, 16314684, 44245201, 119849369, 324308909, 879921037, 2385657333, 6467079803, 17541637367, 47581552613, 129104928784, 350330765356, 950772205549, 2580621276899, 7005302330033
Offset: 2

Views

Author

Labos Elemer, Sep 04 2003

Keywords

Crossrefs

Formula

a(n)=A087235(n+1)-A087235(n)

Extensions

More terms from Giovanni Resta, Sep 01 2018
Showing 1-10 of 16 results. Next