Problem 60955. List mean-of-2 primes
The prime number 53 is the average of the first prime before it (47) and the first prime after it (59), and the prime number 11 is the average of the second prime before it (5) and the second one after it (17). Notice that 11 is also the average the third prime before it (3) and the third prime after it (19).
Write a function that returns the nth prime number that is the average of the kth prime before it and the kth prime after it.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers5
Suggested Problems
-
5 Solvers
More from this Author310
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!