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.

A166968 Minimum k such that for all m >= k there is a prime p with m < p < m * (n+1)/n.

This page as a plain text file.
%I A166968 #21 Feb 16 2025 08:33:11
%S A166968 2,8,9,24,25,32,33,48,115,116,117,118,118,140,140,141,200,212,212,213,
%T A166968 294,294,318,318,319,319,320,320,320,524,525,525,526,526,526,527,527,
%U A166968 528,528,1328,1329,1330,1331,1331,1332,1333,1333,1334,1334,1335,1335
%N A166968 Minimum k such that for all m >= k there is a prime p with m < p < m * (n+1)/n.
%C A166968 The first term was proved by Chebyshev in 1850: for all m > 1, there is a prime number between m and 2m. It is known by Bertrand's Postulate after Joseph Bertrand, who first conjectured it in 1845, and also by Chebyshev's Theorem.
%C A166968 The result a(5)=25 was proved by Jitsuro Nagura in 1952.
%C A166968 The result a(16597)=2010760 was proved by Pierre Dusart in 1998.
%H A166968 Eric M. Schmidt, <a href="/A166968/b166968.txt">Table of n, a(n) for n = 1..10000</a>
%H A166968 Pierre Dusart, <a href="https://web.archive.org/web/20140202143122/http://www.unilim.fr/laco/theses/1998/T1998_01.html">Autour de la fonction qui compte le nombre de nombres premiers</a> (French), 1998.
%H A166968 Jitsuro Nagura, <a href="https://doi.org/10.3792/pja/1195570997">On the interval containing at least one prime number</a>, Proc. Japan Acad. 28: 177-181, 1952.
%H A166968 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/BertrandsPostulate.html">Bertrand's Postulate</a>.
%H A166968 Wikipedia, <a href="http://en.wikipedia.org/wiki/Bertrand&#39;s_postulate">Bertrand's postulate</a>.
%e A166968 For n=4, there are no primes between 23 and 23*5/4 = 28.75. But, for all m >= 24, there is a prime p such that m < p < 5m/4, so a(4) = 24.
%o A166968 (PARI) /* This function searches until it finds 10 primes between x and x*(n+1)/n */
%o A166968 pi_excl(y) = if(y==floor(y),primepi(y)-isprime(y),primepi(y)) /* all primes < y, primepi(y) is all primes <= y */
%o A166968 pbetween(x,y) = pi_excl(y) - primepi(x)
%o A166968 A166968(n) = {local(pr,x,r);pr=0;x=1;r=0;while(pr<10,pr=pbetween(x,x*(n+1)/n);if(pr==0,r=x+1);x=x+1);r}
%o A166968 (Sage)
%o A166968 def a_list() :
%o A166968     known_n, known_k = (16597, 2010760)
%o A166968     L = [0] * known_n
%o A166968     L[known_n-1] = known_k
%o A166968     for n in range(known_n-1,0,-1) :
%o A166968         L[n-1] = 1 + next(k for k in range(L[n]-1,0,-1) if next_prime(k) >= k*(n+1)/n)
%o A166968     return L
%o A166968 # _Eric M. Schmidt_, Oct 21 2017
%Y A166968 Cf. A060715, A104272.
%K A166968 nonn
%O A166968 1,1
%A A166968 _Michael B. Porter_, Oct 25 2009
%E A166968 Edited by _Eric M. Schmidt_, Oct 21 2017