Concatenation sum

Logic Level 3

The number 123456789 is concatenated 1729 times to form a certain number:

A = 123456789123456789 123456789 1729 ( 123456789 ) ’s A = \underbrace{\overline{123456789123456789\dots 123456789}}_{\text{1729 } (123456789)\text{'s}}

Similarly, the number 987654321 is concatenated 1729 times to form another certain number:

B = 987654321987654321 987654321 1729 ( 987654321 ) ’s B=\underbrace{\overline{987654321987654321\dots 987654321}}_{\text{1729 } (987654321)\text{'s}}

If A + B = C A+B = C , find the sum of digits of C C .

Bonus: Generalize this.


The answer is 15561.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Nihar Mahajan
Jun 18, 2015

Since both A , B A,B are 1729 × 9 = 15561 1729 \times 9 = 15561 digit number , there is a perfect pairing between their digits in the sum like this:

1 + 9 = 10 2 + 8 = 10 3 + 7 = 10 4 + 6 = 10 5 + 5 = 10 6 + 4 = 10 7 + 3 = 10 8 + 2 = 10 9 + 1 = 10 1+9=10 \\ 2+8=10 \\ 3+7=10 \\ 4+6=10 \\ 5+5=10 \\ 6+4=10 \\ 7+3=10 \\ 8+2=10 \\ 9+1=10 \\

So there is a bijection between a k t h k^{th} digit of A A and the k t h k^{th} digit of B B such that A k + B k = 10 A_k + B_k = 10 where A i , B i A_i , B_i are the i t h i^{th} digits from left in A A , B B respectively. We observe that i 1 i 15561 \forall \ i \ 1 \leq i \leq 15561 , A i + B i = 10 A_i+B_i=10 . So A + B A+B can be written in the form:

A + B = i = 1 15561 1 0 i 1 ( A 15562 i + B 15562 i ) = i = 1 15561 1 0 i = 111111111 111110 15561 ( 111111111 ) ’s , 1 0 ’s \Large{A+B=\displaystyle\sum_{i=1}^{15561} 10^{i-1}(A_{15562-i} + B_{15562-i}) \\ = \displaystyle\sum_{i=1}^{15561} 10^{i} = \underbrace{\overline{111111111\dots111110}}_{\text{15561 } (111111111)\text{'s} , \text{ 1 } 0\text{'s}}}

Hence sum of digits in A + B = 15561 × 1 = 15561 A+B=15561 \times 1 = \huge\boxed{15561} .


Generalization:

If in A A , 123456789 123456789 is concatenated n n times , in B B , 987654321 987654321 is concatenated n n times , then sum of digits of A + B = 9 n A+B = 9n .

Solved it the same way. When you get C, just multiply 1 x 15561, which also happens to be (Number of digits - 1) because of the trailing zero.

Shashank Rammoorthy - 5 years, 11 months ago
Harshit Singhania
Jun 19, 2015

For 2 concatenations 123456789123456789 + +

987654321987654321

1111111111111111110 So you got (18)1's for 2 concatenations same pattern will be followed for 1729 concatenations and you'll get 1729×9 one's and sum of digits will be 1729×9 which 15561

nice logic

Avijit Roy - 5 years, 11 months ago
Terry Smith
Jun 20, 2015

Nice that you used the Hardy-Ramanujan number 1729 too - https://simple.wikipedia.org/wiki/Taxicab_number

Ofcourse, we are from India :D

Satyajit Mohanty - 5 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...