Problem 60957. List balanced primes

A balanced prime of order k is one that equals the average of the k primes before it and the k primes after it. For example, 79 is the first balanced prime of order 2; it is the average of 71, 73, 83, and 89.
Cody Problem 47798 asks us to determine whether a number is a balanced prime of order one. For order one, balanced primes are equal to mean-of-2 primes.
Write a function that returns the nth prime number that is the average of the k primes before it and the k primes after it.

Solution Stats

66.67% Correct | 33.33% Incorrect
Last Solution submitted on Jul 26, 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!