# Does there exist a k such that the kth prime is balanced in order k-1?

A balanced prime of order n is a prime number that is equal to the arithmetic mean of the nearest n primes above and below.

For example, 5 is a balanced prime in order 1 because it is the average of the prime before it (3) and the prime after it (7).

There is a highest order a prime could be balanced in: the number of primes that are less than it. The question of whether 5, the 3rd prime, is balanced in order 3 is undefined. So the kth prime could be said to be maximally balanced if it's balanced in order k-1; i.e. if you take all the primes less than a prime p, and that many primes greater than it, and average them, you get p again.

The first 500 primes are each less than the average of the primes surrounding them, and the difference tends to increase, but it doesn't strictly increase. So my guess would be that no maximally balanced prime exists, but I doubt there's a quick proof. Am I wrong?

-

If $p_k$ is $(k-1)$-balanced ($k>1$) then $$p_k=\frac{p_1+p_2+\ldots+p_{k-1}+p_{k+1}+\ldots+p_{2k-1}}{2(k-1)}.$$ Since $p_1=2$, the numerator is the sum of $2k-3$ odd numbers and $2$, hence odd. Dividing by an even denominator cannot produce an integer.
Heuristically, the $(n+1)$th prime is $\sim n\log n$. The sum of the first $2n+1$ primes is $\sim S_{2n+1} = \frac{1}{2}(2n+1)^2\log(2n+1)$. We want $(S_{2n+1}-n\log n)\frac{1}{2n} \sim n\log n$. Well, this is true, which suggests (in the weakest possible sense) that there may be infinitely many maximally balanced primes. There are better estimates for the $n$th prime, or the sum of the first $n$ primes, maybe those will give a different result - I am not sure.
I guess there is a simple reason why it can never happen. Prime $p_k$ is maximally balanced if $$p_k = (\sum_{i=1}^{k-1} p_i + \sum_{i=k+1}^{2k-1}p_i)/2(k-1)$$ In this sum, you have one even number $p_1 = 2$ and $(k-2)+(k-1)=2k-3$ odd numbers. This means that $$\sum_{i=1}^{k-1} p_i + \sum_{i=k+1}^{2k-1} \equiv 2k-3 \equiv 1 \pmod 2$$ which means that the sum will never be divisible by an even number.