login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Integer part of prime(n)/pi(n).
3

%I #27 Dec 09 2024 10:11:05

%S 3,2,3,3,4,4,4,5,7,6,7,6,7,7,8,8,8,8,8,9,9,9,9,10,11,11,11,10,11,11,

%T 11,12,12,13,13,13,13,13,14,13,13,13,13,14,14,14,14,15,15,15,15,15,15,

%U 16,16,16,16,16,16,15,16,17,17,17,17,17,17,18,18,17,17,17,17,18,18,18,18

%N Integer part of prime(n)/pi(n).

%C Conjecture: As n -> infinity, there are infinitely many n's such that a(n) is greater than a(n+1).

%C a(n) > a(n + 1) only if n + 1 is prime. - _David A. Corneth_, Aug 22 2020

%H Harry J. Smith, <a href="/A111114/b111114.txt">Table of n, a(n) for n = 2..10000</a>

%e a(2) = 3 as prime(2) = 3, pi(2) = 1 so a(2) = floor(3/1) = 3.

%e a(3) = 2 as prime(3) = 5, pi(3) = 2 so a(3) = floor(5/2) = 2.

%t Table[IntegerPart[Prime[n]/PrimePi[n]],{n,2,80}] (* _Harvey P. Dale_, Nov 19 2014 *)

%o (PARI) a(n) = prime(n)\primepi(n)

%o (PARI) first(n) = {my(res = vector(n), t = 2, pit = 1); forprime(p = 3, oo, res[t-1] = p \ pit; if(t > n, return(res) ); t++; if(isprime(t), pit++ ) ) } \\ _David A. Corneth_, Aug 22 2020

%Y Cf. A000040 (primes), A000720 (pi).

%K nonn,easy

%O 2,1

%A _Cino Hilliard_, Oct 14 2005