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

84.62% Correct | 15.38% Incorrect
Last Solution submitted on Jul 23, 2025

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers5

Suggested Problems

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!