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

A073437 Smallest x such that remainder Mod[A065855(x), A000720(x)]=n.

Original entry on oeis.org

4, 6, 8, 21, 22, 25, 26, 27, 30, 33, 66, 70, 77, 78, 82, 86, 87, 88, 92, 93, 94, 95, 96, 100, 116, 117, 118, 119, 120, 219, 220, 221, 222, 247, 248, 249, 250, 255, 256, 261, 262, 267, 268, 289, 290, 291, 292, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 323
Offset: 1

Views

Author

Labos Elemer, Jul 31 2002

Keywords

Examples

			Remainder 4 appears first as Mod[G[21],Pi[21]]= Mod[21-Pi[21]-1,Pi[21]]=Mod[21-8-1,8]=Mod[12,8]=4, so a(4)=21.
		

Crossrefs

A360789 Least prime p such that p mod primepi(p) = n.

Original entry on oeis.org

2, 3, 5, 7, 379, 23, 401, 61, 59, 29, 67, 71, 467, 79, 83, 179, 431, 89, 176557, 191, 24419, 491, 97, 101, 499, 1213, 3169, 3191, 523, 229, 3187, 223, 3203, 8609, 3163, 251, 176509, 257, 24509, 263, 3253, 269, 547, 3347, 1304867, 293
Offset: 0

Views

Author

Robert G. Wilson v, Feb 20 2023

Keywords

Comments

Inspired by A048891.

Examples

			For n=0, prime p=2 has p mod primepi(p) = 2 mod 1 = 0 so that a(0) = 2.
For n=4, no prime has p mod primepi(p) = 4 until reaching p=379 which is 379 mod 75 = 4, so that a(4) = 379.
		

Crossrefs

Programs

  • Maple
    V:= Array(0..100): count:= 0:
    p:= 1:
    for k from 1 while count < 101 do
      p:= nextprime(p);
      v:= p mod k;
      if v <= 100 and V[v] = 0 then V[v]:= p; count:= count+1 fi;
    od:
    convert(V,list); # Robert Israel, Feb 28 2023
  • Mathematica
    t[_] := 0; p = 2; pi = 1; While[p < 1400000, m = Mod[p, pi]; If[m < 100 && t[m] == 0, t[m] = p]; p = NextPrime@p; pi++]; t /@ Range[0, 99]
  • PARI
    a(n)={my(k=n); forprime(p=prime(n+1), oo, k++; if(p%k ==n, return(p)))} \\ Andrew Howroyd, Feb 21 2023
    
  • Python
    from sympy import prime, nextprime
    def A360789(n):
        p, m = prime(n+1), n+1
        while p%m != n:
            p = nextprime(p)
            m += 1
        return p # Chai Wah Wu, Mar 18 2023

Formula

a(n) = prime(A073325(n+1)). - Kevin Ryde, Feb 21 2023
Showing 1-3 of 3 results.