Is it possible to know the sum of the digits of a number (in base 10), without knowing the digits?

302 Views Asked by At

Let's say that you have a really big power of 2, that's so big that you can't print it out on a computer. Would it still be possible to find the sum of its digits?

There is a similar result that is weaker. If we denote sum of digits by the function $s(n)$, then $s(2^{n+1}) \equiv 2\cdot s(2^n)\pmod 9$. So if we were interested in sum of digits mod 9, we could iteratively apply the identity to find this sum for super large numbers, without knowing the digits themselves.

1

There are 1 best solutions below

0
On

There is a formula for the sum of digits of $n$: $$s(n) = n -9\sum_{k=1}^\infty\left\lfloor\frac{n}{10^k}\right\rfloor$$

Note that the sum finite since $\left\lfloor\frac{n}{10^k}\right\rfloor = 0$ for $k$ big enough.

I doubt this formula simplifies enough to calculate the sum of digits of numbers of the form $2^n$.