5

I have been looking at this for quite a while, however I can't find a solution - I guess there needs to be a clever way to deal with this incredibly large number that I am not aware of... I actually need to figure out the digit sum of the digit sum of the digit sum of 99⁹⁹. Any help or ideas would be greatly appreciated.

CiaPan
  • 13,049
  • It is divisible by 9, so the digit sum is 9 ? – AgentS Oct 29 '19 at 22:34
  • Well, the digit sum can be any multiple of 9... – Tony Starck Oct 29 '19 at 22:38
  • 1
    @ganeshie8 The OP says that he wants to compute the digit sum $3$ times, not indefinitely. – saulspatz Oct 29 '19 at 22:38
  • Ah ok. Then I'd start by figuring out the max number of digits in the digit sum of $99^{99}$ – AgentS Oct 29 '19 at 22:38
  • @rogerl Clever! – AgentS Oct 29 '19 at 22:40
  • I get $\operatorname{digsum}(99^n)=\begin{cases}9(n+1),&n\ \text{odd}\9n,&n\ \text{even}\end{cases}$ but haven't yet proven it. – Jam Oct 29 '19 at 22:42
  • You can take the number mod 100 since 99=-1. The digit sum of digit sum of digit sum will not be more than 100. – Michael Oct 29 '19 at 22:43
  • $99^{99}$ has $\lfloor 99 \log_{10} 99 + 1 \rfloor = 198$ digits, and the maximum sum (if they are all $9$s) is $198 \cdot 9$. It should not be hard to prove that for any four digit number, the sum reduces to $9$ in three steps, since finding the digit sum takes at least one digit from the number. – Toby Mak Oct 29 '19 at 22:45
  • 1
    FYI: the sum of digits of $99^{99}$ is $936$. – WhatsUp Oct 29 '19 at 22:52

2 Answers2

6

$99^{99}$ is less than $10^{198}$, therefore has at most 198 digits. When you sum them up (first time), you get a number that is less than or equal to $9\times 198=1782$. When you sum up the digits of that number (second time), you get something less than or equal to $\max(9+9+9, 1+6+9+9)=27$. When you sum up the digits of this last number, you get something less than or equal to $\max(2+7, 1+9)=10$.

But the original number is a multiple of $9$, hence the last number has to be a multiple of $9$. Note that it cannot be zero, because only $0$ itself has a sum of digits equal to $0$ and you started from $99^{99}\neq 0$. Therefore it is $9$.

4

$$99^{99}<100^{100}=10^{200}$$ so $99^{99}$ has at most $200$ digits and its digit sum is at most $1800.$ The digit sum of the digit sum is at most $28$ (a $1$ and three $9$'s). The digit sum of the digit sum of the digit sum is at most $11$, and it must be divisible by $9$, so it can only be $9$.

saulspatz
  • 53,131