Sum of Last Digits

66 Views Asked by At

$$ a=123456789; b= 987654321 $$ $$ M = (a \times 10^{18} + 1)^b $$

What is the sum of last 36 digits of $ M $ ?

1

There are 1 best solutions below

1
On BEST ANSWER

$$M=(a \cdot 10^{18} + 1)^b=\sum_{i=0}^b\left({b\atop i}\right)(a\cdot10^{18})^i\cdot1^{b-i}\\ =1+b\cdot a\cdot10^{18}+\sum_{i=2}^b\left({b\atop i}\right)(a\cdot10^{18})^i \equiv1+b\cdot a\cdot10^{18}\pmod{10^{36}}$$

So the last 18 digits are 17 zeroes and a one.

And the last 18 digits of $a\cdot b$ form the digits 36 to 19 (seen from behind) of $M$.

Not sure if there is a "smart" way to get them, but we can just calculate them with a calculator. This yields

$$121932631112635269000000000000000001$$

the digit sum of which is $64$.