Andrica's Conjecture

2 views (last 30 days)
Jesús Zambrano
Jesús Zambrano on 15 Dec 2024
Edited: Torsten on 15 Dec 2024
I'd like to get a simple MATLAB code showing the Andrica's conjecture.
More about it can be found here: Andrica's conjecture - Wikipedia

Accepted Answer

Torsten
Torsten on 15 Dec 2024
Edited: Torsten on 15 Dec 2024
Use
nthprime(1:n+1)
to generate the vector of the first n+1 prime numbers.
The rest should be simple.

More Answers (0)

Categories

Find more on Discrete Math in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!