How to find the sum of digits of a number whose prime factorisation is given

For example, if $$n = 15^2 \times 5^{18}$$ in base $$10$$. Is there a way to find the upper and lower bounds for the sum of digits of this number? The answer is given to be $$6\leq s \leq 140$$. Also, is there a way to calculate the exact sum?

Also, how do i find the number of digits of this number?

• Regarding the number of digits of $n$: Note that $\log_{10}n\approx 14.93$. In particular, $14<\log_{10}n<15$, so $10^{14}<n<10^{15}$. This means that $n$ has 15 digits ($n$ is more than $100,000,000,000,000$ but less than $1,000,000,000,000,000$). – MPW Oct 10 at 15:58
• My calculator has the exact value: $858,306,884,765,625.$ – Thomas Andrews Oct 10 at 16:00
• Well, obviously you can do it exactly by calculating the exact value of it and adding the digits. And clearly whoever came up the is answer didn't. And the ignores that $9|n$ so $s \ge 9$. I don't know what methods the person used to get this range of values but I dont think it matters as the person didn't seem to care bout the exact number. ... oh the number of digits $\approx \log n$ rounded up. – fleablood Oct 10 at 16:00
• @ThomasAndrews This question is from an exam where calculators weren't allowed the year this question was given – Techie5879 Oct 10 at 16:06
• Well, How precise an answer do they want. You can always say a lower bound is $1$ and an upper bound is a $9$ times the number of digits which most be less than $100^2 *100^{18}=40$ or $360$. It doesn't seem to me that $6\le s \le 140$ is much better than that. It's slightly better but not much better. – fleablood Oct 10 at 16:17

Since the number ends with $$5$$ , the sum of the digits at the minimum would be $$6$$ (Since at least one of the other terms is $$\ge 1$$).

As for the upper bound , As pointed out in the comments , since the number has $$15$$ digits , I believe the maximum sum should be $$9*14 +5 = 131$$

Hence the limits should be $$6\le s\le 131.$$

• But $9|15^2$ so so the sum of the digits is a multiple of $9$ so $9 \le s \le 131$. So the question is how much accuracy does the question want. – fleablood Oct 10 at 16:19
• @fleablood considering the answer they provided , I believe they were too lazy to even carry out the answer properly . – The Demonix _ Hermit Oct 10 at 16:21
• @fleablood Like you, I saw that the sum of the digits must be divisible by $9$, so I concluded that $9\le s\le 126$ since the numbers between $127$ and $131$ inclusive are not divisible by $9$ – Keith Backman Oct 10 at 18:44
• @KeithBackman Just dope slap me..... – fleablood Oct 10 at 18:45

For an upper bound, without logarithms or calculators:

$$\begin{array}{ccc}15^2\cdot5^{18}&<&16^2\cdot 15^{18}\\ &=&16^2\cdot 5^3\cdot5^{15}\\ &<&16^2\cdot 2^7\cdot5^{15}\\ &=&2^{15}\cdot 5^{15}\\ &=&10^{15} \end{array}$$ So the number has at most $$15$$ digits, one of which is a $$5$$. So the digit sum can be upper bounded by $$9\cdot 14+5=131$$.

Whatever method the given answer used seems to have allowed for up to $$16$$ digits including one $$5$$.

Another estimation for the number of digits is that, since $$2^{10}> 10^3$$, you have that $$\log_{10} 2 >0.3$$ so $$\log_{10} 5 =1-\log_{10} 2 <0.7$$ so $$\log_{10} 5^{20}=20\log_{10} 5< 14.$$

So $$5^{20}$$ is no more than $$14$$ digits, and thus $$15^2\cdot 5^{18}=9\cdot 5^{20}$$ is no more than $$15$$ digits.

Well, if you want any upper bound then $$n =15^2*5^{18} < 10^{100}$$ so it has fewer than a hundred digits each at most $$9$$ so an upper bound is $$900$$

And a lower bound is $$0$$ as the sum is surely positive.

So $$0 \le s < 900$$

I'm being facetious but whoever did this didn't do much more than that.

I figure s/he figured being an odd multiple of $$5$$ then last digit was $$5$$ and having more than one digit the sum $$s\ge 6$$.

That is bare minimum of work. As $$n = 15^2*5^{18}=9*5^{20}$$ the number must be a multiple of $$9$$. So $$s \ge 9$$.

And the number of digits is $$\lfloor \log 9*5^20\rfloor + 1=15$$ so the upper bound is $$15*9 = 135$$. Don't know how the upper bound of $$140$$ was figured. We know the last digit if $$5$$; not $$9$$ so $$131$$ is an upper bound.

[Credit where credit is due. Even though I knew the last digit it didn't occur to me to consider it an exception to digits being $$9$$ and thus $$131$$ is legitimate upper bound. Credit to the Demonix Hermit for that basic observation.]

We can probably figure the first digit of $$n=9*5^{20} = 9*10^{20}\frac 1{2^{20}} = 9*\frac 1{1024*1024}10^{20}\approx 9*\frac 1{1000000 + 50000 + 25^2}*10^{20}$$ has $$8$$ and not $$9$$ as a first digit so $$18\le s \le 130$$.

Now of course we can actually do the problem. $$n =858306884765625$$ and $$s = 81$$.

I'm really unsure what degree of accuracy is expected.