For non-negative integers a 1 , a 2 , a 3 , … , a n ≤ 9 , let
f ( a 1 , a 2 , … , a n ) = a 1 + 1 1 a 2 + 1 1 1 a 3 + … + Number of 1s = n 1 1 1 … 1 1 1 a n
Find number of positive integers N < 1 0 7 such that there exists no possible set of non-negative integers a 1 , a 2 , a 3 , … , a n ≤ 9 such that N = f ( a 1 , a 2 , … , a n ) .
All of my problems are original .
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.
Notice that a 1 is never large enough to reach 1 1 , and a 1 + 1 1 a 2 is never large enough to reach 1 1 1 , and so on. This means that we cannot rewrite the sum a 1 + 1 1 a 2 + ⋯ + 1 1 1 … 1 1 1 a n using different values of a 1 , … , a n to sum to the same value. Thus, every combination of values of a 1 , … , a n gives a unique value for f ( a 1 , … , a n ) .
So, we simply need the number of combinations of a 1 , … , a n such that 0 < f ( a 1 , … , a n ) < 1 0 7 = 1 0 , 0 0 0 , 0 0 0 . First note that any nonzero terms past n = 7 will be larger than 1 0 7 , so we are only interested in a 1 , … , a 7 . If a 7 is equal to 9, then all the other terms must be zero for the sum to equal 9,999,999 and be less than 10^7. Otherwise, the maximum possible value of the sum will be attained at a 1 = a 2 = ⋯ = a 6 = 9 , and a 7 = 8 , for a total of 9 + 9 9 + 9 9 9 + 9 9 9 9 + 9 9 9 9 9 + 9 9 9 9 9 9 + 8 8 8 8 8 8 8 = 9 9 9 9 9 9 2 < 1 0 7 Last of all, we require the sum to be greater than zero, so the combination a 1 = ⋯ = a 7 = 0 does not count. Hence, the total number of values of f ( a 1 , … , a n ) less than 10^7 is 10 options for each a k except a 7 1 0 6 × 9 for 9 9 9 9 9 9 9 + 1 for 0 − 1 = 9 0 0 0 0 0 0
There are 1 0 7 − 1 positive integers less than 1 0 7 , so the number of positive integers not of this form is 1 0 7 − 1 − 9 0 0 0 0 0 0 = 9 9 9 9 9 9
Excellent solution sir. Thanku for sharing it with us.
Problem Loading...
Note Loading...
Set Loading...
Seeing a 1 , a 2 … a n ≤ 9 reminds of digits. Let X = a n a n − 1 a n − 2 … a 2 a 1
Now,
f ( a 1 , a 2 , … , a n ) = 1 ⋅ a 1 + 1 1 ⋅ a 2 + 1 1 1 ⋅ a 3 + … + Number of 1s = n 1 1 1 … 1 1 1 ⋅ a n
f ( a 1 , a 2 , … , a n ) = ( 1 0 n − 1 a n + 1 0 n − 2 a n − 1 + … + 1 0 0 a 1 ) + ( 1 0 n − 2 a n + 1 0 n − 3 a n − 1 + … + 1 0 0 a 2 ) + ( 1 0 n − 3 a n + 1 0 n − 4 a n − 1 + … + 1 0 0 a 1 ) + … + ( 1 0 a n + a n − 1 ) + a n
f ( a 1 , a 2 , … , a n ) = a n a n − 1 … a 1 + a n a n − 1 … a 2 + a n a n − 1 … a 3 + … + a n a n − 1 + a n
Therefore, we to find number of positive integers X = a n a n − 1 … a 1 such that N = a n a n − 1 … a 1 + a n a n − 1 … a 2 + a n a n − 1 … a 3 + … + a n a n − 1 + a n < 1 0 7
Now, smallest X = 0 and biggest X = 9 × 1 0 6 .
So, number of integers = 1 0 7 − ( 9 × 1 0 6 + 1 ) N
number of integers = 9 9 9 9 9 9