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

14 Solutions

7 Solvers

Last Solution submitted on Jun 06, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...