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 10 results.

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

A038627 Number of solutions x to n * pi(x) = x, where pi(x) = number of primes <= x.

Original entry on oeis.org

0, 4, 3, 3, 6, 7, 6, 6, 3, 9, 1, 18, 11, 12, 21, 3, 10, 33, 31, 32, 24, 8, 13, 32, 35, 4, 15, 9, 15, 26, 22, 24, 9, 3, 14, 55, 36, 3, 65, 52, 33, 139, 42, 2, 85, 25, 7, 96, 16, 33
Offset: 1

Views

Author

Keywords

Comments

Equivalently, a(n) is number of solutions x to the equation pi(n*x) = x. - Farideh Firoozbakht, Jan 09 2005 [For example, a(2) = 4 because 1, 2, 3 & 4 are all solutions of pi(2*x) = x and a(11) = 1 because 15927 is the only solution of the equation pi(11*x) = x.]
S. W. Golomb proved that a(n) > 0 for each integer n > 1. - Carlo Sanna, Nov 09 2015

Examples

			11*pi(x) = x has only 1 solution, so a(11) = 1.
		

Crossrefs

Programs

  • Mathematica
    (* Assumes upper and lower bounds are as defined in A038626. *)
    xmin = .5; xmax = 2;
    Join[{0},Table[c = 0; x = Floor[2.4*xmin]; x1 = 2.7*xmax + 7;
      xmin = Infinity; xmax = 0; While[x <= x1,
       If[x == PrimePi[n x], c++; xmin = Min[x, xmin];
    xmax = Max[x, xmax]]; x++]; c, {n, 2, 15}]] (* Robert Price, Mar 28 2020 *)

Extensions

One more term from Labos Elemer, Sep 05 2003
a(24)-a(26) from Labos Elemer, Sep 12 2003
Edited by N. J. A. Sloane, Sep 06 2008 at the suggestion of R. J. Mathar
a(27)-a(29) from David Radcliffe, Sep 10 2014
a(29) corrected and a(30)-a(50) obtained from the A038625 values computed by Jan Büthe. - Giovanni Resta, Aug 31 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

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

A038606 Least k such that k-th prime > n * k.

Original entry on oeis.org

1, 5, 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, 382465573483, 1003652347100
Offset: 1

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net) 1998 Jul

Keywords

Comments

Log(a(n)) =~ -1.295 + 0.964312n. - Robert G. Wilson v, Jan 25 2002
Numbers n such that prime(n) (mod n) begins the next cycle of terms in A004648. Generally prime(i) (mod i) exceeds prime(i-1) (mod i-1) but there are numerous times where for a short run prime(i) (mod i) is minimally less than its predecessor. Here n is substantially less. See Labos's graph.
A090973(a(n)) = n+1. [From Reinhard Zumkeller, Aug 16 2009]
With offset 2: Index j of prime p(j) such that ceiling[p(j)/j]=n is first satisfied. a(n) = A062742(n) = A038624(n) for n >= 3. [From Jaroslav Krizek, Dec 13 2009]

Crossrefs

Programs

  • Maple
    A038606 := proc(n)
        for k from 1 do
            if ithprime(k)> n*k then
                return k;
            end if;
        end do:
    end proc: # R. J. Mathar, Aug 24 2013
  • Mathematica
    k = 1; Do[ While[ Floor[ Prime[k]/k] < n, k++ ]; Print[k]; k++, {n, 1, 30} ]
  • PARI
    k=1;n=1;forprime(p=3,4e9,if(p/n++>k,print1(n", ");k++)) \\ Charles R Greathouse IV, Sep 06 2011

Formula

a(n) = pi(A038607(n)) = A000720(A038607(n)).

Extensions

Edited by Robert G. Wilson v, Jan 25 2002
a(21)=179992909 corrected by Ray Chandler, Dec 01 2004
a(29)-a(30) from Charles R Greathouse IV, Sep 06 2011
a(31)-a(50) obtained from the values of A038625 computed by Jan Büthe. - Giovanni Resta, Sep 01 2018

A062742 Index j of prime p(j) such that floor(p(j)/j) = n is first satisfied.

Original entry on oeis.org

2, 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

Labos Elemer, Jul 12 2001

Keywords

Examples

			The q(j)=p(j)/j quotient when the value 14 first appears: {j=251706, p(j)=3523841, q(j)=13.9998291} {251707, 3523901, 14.0000119} {251708, 3523903, 13.9999642} {251709, 3523921, 13.9999801} {251710, 3523957, 14.0000675} {251711, 3523963, 14.0000357}
		

Crossrefs

Essentially the same as A038624.
Cf. A038606. - R. J. Mathar, Jan 30 2009

Programs

  • PARI
    {a062742(m)=local(n,j); for(n=1,m,j=1; while(floor(prime(j)/j)!=n,j++); print1(j,","))} a062742(10^7)

Formula

a(n) = Min_{j| floor(p(j)/j) = n}. Note that neither p(j)/j nor floor(p(j)/j) is monotonic.
a(n) = pi(A062743(n)).
a(n) = A038606(n) = A038624(n) for n >= 3. - Jaroslav Krizek, Dec 13 2009

Extensions

More terms from Jason Earls, May 15 2002
a(17)-a(28) from Farideh Firoozbakht and Robert G. Wilson v, Sep 13 2005
a(29)-a(50) obtained from the values of A038625 computed by Jan Büthe. - Giovanni Resta, Sep 01 2018

A022465 Numbers n such that prime(n) mod n <= 10.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 31, 32, 33, 34, 35, 36, 37, 69, 73, 74, 75, 76, 77, 78, 79, 80, 181, 191, 443, 445, 1052, 2701, 2703, 6455, 6456, 6457, 6459, 6460, 6466, 15928, 15929, 16055, 40073, 40078, 40080, 40081, 40082, 40083, 40122
Offset: 1

Views

Author

Keywords

Comments

a(96) > 5*10^6. - Robert Israel, Aug 29 2018

Crossrefs

Cf. A038624.

Programs

  • Maple
    Res:= NULL; p:= 1; count:= 0:
    for n from 1 while count < 80 do
      p:= nextprime(p);
      if p mod n <= 10 then count:=count+1; Res:= Res, n;
      fi
    od:
    Res; # Robert Israel, Aug 29 2018
  • Mathematica
    Select[Range[41000],Mod[Prime[#],#]<=10&] (* Harvey P. Dale, Aug 21 2011 *)

Extensions

More terms from David W. Wilson
More terms from Robert Israel, Aug 29 2018

A086511 a(n) is the smallest integer k > 1 such that k > n * pi(k), where pi() denotes the prime counting function.

Original entry on oeis.org

2, 9, 28, 121, 336, 1081, 3060, 8409, 23527, 64541, 175198, 480865, 1304499, 3523885, 9557956, 25874753, 70115413, 189961183, 514272412, 1394193581, 3779849620, 10246935645, 27788566030, 75370121161, 204475052376, 554805820453, 1505578023622, 4086199301997
Offset: 1

Views

Author

Tim Paulden (timmy(AT)cantab.net), Sep 09 2003

Keywords

Comments

a(n) is bounded above by the sequence A038623, in which k is required to be prime. In addition, the sequence pi(a(n)) = {1, 4, 9, 30, 67, 180, 437, 1051, ...} closely resembles the sequence A038624, in which the n-th term is the minimal t such that k >= n * pi(k) for every k satisfying pi(k) = t. If we were to make the inequality in A038624 strict, the resulting sequence would provide an upper bound for pi(a(n)). Sequences A038625, A038626 and A038627 focus on the equality k = n * pi(k): as we would expect, a(n) follows A038625 very closely for large n.

Examples

			Consider the pairs (k, pi(k)) for k > 1. The inequality k > 1 * pi(k) is first satisfied at k = 2 and so a(1) = 2. Similarly, the inequality k > 2 * pi(k) is first satisfied at k = 9 and so a(2) = 9.
		

Crossrefs

Programs

  • PARI
    a(n) = { k = 2; while (k <= n*primepi(k), k++); return (k);} \\ Michel Marcus, Jun 19 2013

Formula

Heuristically, for large n, a(n) ~= 3.0787*(2.70888^n) [error < 0.05% for 15 <= n <= 20].
From Nathaniel Johnston, Apr 10 2011: (Start)
a(n) >= exp(n/2 + sqrt(n^2 + 4n)/2), n >= 6.
a(n) = A038625(n) + m(n)*n + 1 for some m(n) >= 0. For n = 2, 3, 4, ..., m(n) = 3, 0, 6, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, ...
(End)

Extensions

a(21)-a(26) from Nathaniel Johnston, Apr 10 2011
Corrected a(26) and a(27)-a(28) from Giovanni Resta, Sep 01 2018
a(29)-a(50) obtained from the values of A038625 computed by Jan Büthe. - Giovanni Resta, Sep 01 2018

A090974 Duplicate of A038606.

Original entry on oeis.org

0, 1, 5, 12, 31, 69, 181, 443, 1052, 2701, 6455, 15928, 40073, 100362, 251707, 637235
Offset: 0

Views

Author

Keywords

Comments

With offset 1: Index j of prime p(j) such that ceiling[p(j)/j]=n is first satisfied for n >= 2. a(n) = A038606(n) = A062742(n) = A038624(n) for n >= 3. [From Jaroslav Krizek, Dec 13 2009]
Showing 1-10 of 10 results.