The closest consecutive prime numbers are 2 and 3 which only differ by 1. Other consecutive prime numbers will differ by an even number. For example, 3 and 5 as well as 5 and 7 differ by 2. Find an example of a pair of consecutive prime numbers for each of the required difference specify in the problem. There is no unique answer for each case; so, your answers will be checked against the requirement.
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers24
Suggested Problems
-
Project Euler: Problem 7, Nth prime
1749 Solvers
-
392 Solvers
-
Return elements unique to either input
807 Solvers
-
middleAsColumn: Return all but first and last element as a column vector
646 Solvers
-
154 Solvers
More from this Author180
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!