# Are there infinitely many solutions such that the digit sum of a prime power is a smaller power of the same prime?

While discussing prime powers and divisors, I came up with the following problem.

## Examples

$$\to$$ prime $$p=3$$

• digit sum (in base ten) of $$p^3=27$$ is $$p^2=9$$, a power of $$p$$,.

$$\to$$ prime $$p=7$$

• digit sum of $$p^4=2401$$ is $$p^1=7$$, a power of $$p$$.

We can get even crazier:

$$\to$$ prime $$p=5$$

• digit sum of $$p^{208}$$ is equal to $$p^4=625$$.

and so on.

The PARI/GP code used to generate the examples is below:

sfun(p,k,n)={for(q=2,n,if(sumdigits(p^q,10)==p^k,print(q)))}.

## Questions

Main question:

Denote the digit sum (in base ten) of an integer $$m$$ as $$s(m)$$.

Are there infinitely many solutions such that $$s(p^n)=p^k$$ where $$p$$ is a prime, and $$k,n$$ are positive integers?

When $$p=3$$, it has the nice property that $$s(3^n)$$ is always divisible by $$3$$, so the first few solutions are not very hard to find. For example, when $$k=3$$, we obtain $$n=9,10,11,13,16,17,21$$.

Some experimentation with the code reveals that the solutions get sparser as $$p$$ increases, as expected. But the solutions themselves are very unexpected, such as $$s(5^{4938})=5^6,\quad s(89^{898})=89^2.$$ Thus I believe in the finitude of the solutions, but I think evaluating them will be out of the question. To disprove my claim, it suffices to show that for every $$p$$ there is a solution, since we know that the number of primes is infinite.