Problem 60972. Check Bertrand-Chebyshev's theorem about prime numbers
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
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers13
Suggested Problems
More from this Author42
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!