What is the value of ? ? For any positive integer k, find the value of and prove your assertion is correct?

So I simply tested out values, and for a lot of primes and powers, it's simply 0, but sometimes, when , for example, it's sometimes either 0 or 2, like when it's 2, but when , it's 0. I can't come up with a clear formula for any of these values.