Problem 47950. Test the generalized Legendre conjecture

The Legendre conjecture states that for every integer n there is a prime number between n^2 and (n+1)^2. The generalized Legendre conjecture (GLC) is that there is a prime number between n^K and (n+1)^K; a further conjecture is that the smallest K possible is log(1151)/log(95).
Write a function that takes a value of K, which you can assume to be less than log(1151)/log(95), and determines the first value of n for which the GLC fails as well as the interval [n^K (n+1)^K].

Solution Stats

50.0% Correct | 50.0% Incorrect
Last Solution submitted on Apr 30, 2023

Solution Comments

Show comments

Problem Recent Solvers13

Suggested Problems

More from this Author269

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!