#116
Prime Sandwich
 

Difficulty:Medium
Topics:math


A balanced prime is a prime number which is also the mean of the primes directly before and after it in the sequence of valid primes. Create a function which takes an integer n, and returns true iff it is a balanced prime.
test not run
(= false (__ 4))
test not run
(= true (__ 563))
test not run
(= 1103 (nth (filter __ (range)) 15))


Code which fills in the blank: