Historical context
Bertrand's postulate, also later known as Chebyshev's theorem, is a very important theorem in number theory stating that for every integer greater than 1, there always exists at least on prime number between it and its double :
Problem statement
For a given input n, List the prime number(s) p in the interval ]n; 2n[.
Examples
  • n = 2 => p = 3;
  • n = 3 => p = 5;
  • n = 7 => p = [11, 13];
  • n = 47 => p = [53, 59, 61, 67, 71, 73, 79, 83, 89];
Forbidden functions / expressions
  • regexp
  • assignin
  • str2num
  • echo
See also

Solution Stats

46 Solutions

35 Solvers

Last Solution submitted on Feb 06, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...