Yeah, I've just solved 1236 problems on Brilliant (as the Stats sub-section in the About section says)!
Long ago, I noticed a special property about the 4-digit number 1236.
The property is as follows:
The sum of its digits, , is equal to the number 12 formed by the left half of the digits of 1236; the product of its digits, , is equal to the number 36 formed by the right half of the digits of 1236.
Let me precisely define the terms Left-Half and Right-Half for a positive integer with an even number of digits, where the leftmost digit is non-zero.
If is a positive integer with digits, then the number is the Left-Half of and the number is the Right-Half of .
To celebrate this moment, I've decided to share the following problem:
Find the sum of all positive integers with digits and non-zero leftmost digit such that the sum of digits of is equal to its Left-Half and the product of digits of is equal to its Right-Half .
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.
Let A P be the set of all positive integers P with 2 n > 0 digits and the leftmost digit is non-zero such that the sum of digits of P is equal to its Left-Half and the product of digits of P is equal to its Right-Half .
We also use S P to denote the sum of digits of P and G P to denote the product of digits of P .
We consider the decimal expansion of P = d 2 n − 1 × 1 0 2 n − 1 + d 2 n − 2 × 1 0 2 n − 2 + … … … + d n × 1 0 n + … … … + d 1 × 1 0 + d 0 , with d 2 n − 1 = 0 .
Then L = d 2 n − 1 × 1 0 n − 1 + d 2 n − 2 × 1 0 n − 2 + … … … + d n and R = d n − 1 × 1 0 n − 1 + d n − 2 × 1 0 n − 2 + … … … + d 0 .
First let's prove such P do not exist for n > 2 . To prove this, we'll show that L > S P for n ≥ 3 .
Let's see if there are such P for n = 1 .
For n = 1 , the decimal expansion of P = d 1 × 1 0 + d 0 . Then, L = d 1 , R = d 0 .
P ∈ A P only if S P = d 1 + d 0 = L = d 1 ⟹ d 1 + d 0 = d 1 ⟹ d 0 = 0 .
So, d 0 = 0 is a necessary condition for P ∈ A P .
Moreover, it turns out that d 0 = 0 is also a sufficient condition for P ∈ A P . Because, if d 0 = 0 , then S P = d 1 + d 0 = d 1 = L and G P = d 1 × d 0 = 0 = d 0 = R .
That means, P = d 1 × 1 0 + d 0 ∈ A P ⟺ d 0 = 0 .
So, 1 0 , 2 0 , 3 0 , 4 0 , 5 0 , 6 0 , 7 0 , 8 0 , 9 0 ∈ A P .
Now let's see if there are such P for n = 2 .
For n = 2 , the decimal expansion of P = d 3 × 1 0 3 + d 2 × 1 0 2 + d 1 × 1 0 + d 0 . Then L = d 3 × 1 0 + d 2 and R = d 1 × 1 0 + d 0 .
Now, L = S P
⟺ d 3 × 1 0 + d 2 = d 3 + d 2 + d 1 + d 0
⟺ 9 × d 3 = d 1 + d 0
As d 1 + d 0 ≤ 1 8 and d 3 = 0 , there are two possibilities for d 3 , namely, 1 and 2 .
When d 3 = 2 , we have only one option for R = d 1 × 1 0 + d 0 , namely R = 9 9 . Then P = 2 a 9 9 for some decimal digit a . But P = 2 a 9 9 satisfies the G P = R condition for NO a . So, P = 2 a 9 9 ∈ A P .
When d 3 = 1 , the options we have for R = d 1 × 1 0 + d 0 are: 0 9 , 9 0 , 1 8 , 8 1 , 2 7 , 7 2 , 3 6 , 6 3 , 4 5 and 5 4 . Applying the same logic on each R as we did in the case when d 3 = 2 , we'll able to find only one P that belongs to A P , namely, 1 2 3 6 .
Hance, A P = { 1 0 , 2 0 , 3 0 , 4 0 , 5 0 , 6 0 , 7 0 , 8 0 , 9 0 , 1 2 3 6 } .
So, the answer is 1 0 + 2 0 + 3 0 + 4 0 + 5 0 + 6 0 + 7 0 + 8 0 + 9 0 + 1 2 3 6 = 1 6 8 6 .