Is there any formula to get direct value for this function.
$F(p,q)$ = sum of digits in $p^q$
I know that i can compute $p^q$ and sum up the digits. But I want to find it when $p$ and $q$ are big numbers. So is there any number theory formula for this?
Edit: $1<=p<=9$ , $q<3000$