# Prime towers

Find the last three digits of the sum of all (positive) primes $p<1000,$ such that for some integer $n$, the expression $n^2-pn$ is a prime power.

Details and assumptions

A prime power is a number of the form $q^m$ where $q$ is a prime and $m$ is a positive integer.

×