Let a 1 , a 2 , a 3 , a 4 , … be a sequence of all positive integers arranged in ascending order that have the following properties:
Here are the first few terms in this sequence: 4 , 5 , 7 , 8 , 4 0 , 4 4 , 4 6 , 4 7 , 4 9 , 5 0 , 5 5 , 5 6 , … Find the value of a 1 1 5 3 .
See also:
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.
1 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
We have the following lemma and its corollary, a sketch of the proof is given below, you can see the full details in my solution to Number Discrimination 2 :
(numbers that are multiples of 3 but don't contain the digits 1 , 2 or 3 are given the name anti-threes )
Lemma 1: For any 1 0 k ( k ∈ N ) consecutive non-negative multiples of 3, all 1 0 k digit sequences k 0s 0 0 … 0 to k 9s 9 9 … 9 appear once in the last k digits of these 1 0 k numbers.
Proof:
Assume the contrary and say that some digit sequences from k 0s 0 0 … 0 to k 9s 9 9 … 9 don't appear. We now have 1 0 k numbers and less than 1 0 k digit sequences, by piegeonhole principle , there exists two numbers A and B that have the same last k digits, or A ≡ B ( m o d 1 0 k ) . Since 3 ∣ A , B and g cd ( 3 , 1 0 k ) = 1 , we have A ≡ B ( m o d 3 × 1 0 k ) , and since A = B , we must have ∣ A − B ∣ ⩾ 3 × 1 0 k . However, out of these 1 0 k consecutive non-negative multiples of 3, the difference of any two must be smaller than 3 × 1 0 k , this is a contradiction. □
Corollary 1: For any 1 0 k consecutive non-negative multiples of 3, where all of them do not contain 1 , 2 and 3 in any place except in the last k digits, then exactly 7 k of them are anti-threes .
This is true because by lemma 1 , all digit sequences from k 0s 0 0 … 0 to k 9s 9 9 … 9 appear once, for 1 0 k consecutive non-negative multiples of 3, 7 k of them don't contain the digits 1 , 2 or 3 in their last k places. The digits 1 , 2 and 3 also don't appear anywhere else apart in the last k digits.
As a direct implication of corollary 1 ,
(1) If we have 1 0 consecutive non-negative multiples of 3, where none of them have 1 , 2 or 3 in all other places except in the units, then 7 of these 1 0 numbers are anti-threes .
(2) If we have 1 0 0 consecutive non-negative multiples of 3, where none of them have 1 , 2 or 3 in all other places except in the units and the tens, then 7 2 = 4 9 of these 1 0 0 numbers are anti-threes .
(3) If we have 1 0 0 0 consecutive non-negative multiples of 3, where none of them have 1 , 2 or 3 in all other places except in the units, the tens and the hundreds, then 7 3 = 3 4 3 of these 1 0 0 0 numbers are anti-threes .
Consider numbers from 1 to 7999, we partition the numbers like so (notation wise, assume the intervals only contain integers): 2 anti-threes: { 6 , 9 } [ 1 , 9 ] 0 anti-threes [ 1 0 , 3 9 ] 7 anti-threes [ 4 0 , 6 9 ] 7 anti-threes [ 7 0 , 9 9 ] 0 anti-threes [ 1 0 0 , 3 9 9 ] 49 anti-threes [ 4 0 0 , 6 9 9 ] 49 anti-threes [ 7 0 0 , 9 9 9 ] 0 anti-threes [ 1 0 0 0 , 3 9 9 9 ] 343 anti-threes [ 4 0 0 0 , 6 9 9 9 ]
2 anti-threes: { 7 0 0 5 , 7 0 0 8 } [ 7 0 0 0 , 7 0 0 9 ] 0 anti-threes [ 7 0 1 0 , 7 0 3 9 ] 7 anti-threes [ 7 0 4 0 , 7 0 6 9 ] 7 anti-threes [ 7 0 7 0 , 7 0 9 9 ] 0 anti-threes [ 7 1 0 0 , 7 3 9 9 ] 49 anti-threes [ 7 4 0 0 , 7 6 9 9 ] 49 anti-threes [ 7 7 0 0 , 7 9 9 9 ]
(Apply (1) to red intervals, (2) to orange intervals, and (3) to green intervals)
We see that there are 5 7 1 anti-threes from 1 to 7999. From 1 to 7999, the number of integers that don't contain 1 , 2 or 3 is 5 × 7 3 − 1 = 1 7 1 4 (Why? Consider a 4-digit sequence □ □ □ □ , 0001 represents 1, 0002 represents 2 and so on, we choose digits for the 4 places. Since we can't use 1 , 2 , or 3 , we are left with 7 digits to choose for the last 3 places. For the first place, we can only use the digits 0 , 4 , 5 , 6 and 7 . We also subtracted 1 at the end to exclude 0000). Out of these 1 7 1 4 numbers that don't contain 1 , 2 , 3 , 5 7 1 of them are multiples of 3 ( anti-threes ), and 1 7 1 4 − 5 7 1 = 1 1 4 3 of them are not multiples of 3 (which is what we're looking for).
We now know that a 1 to a 1 1 4 3 are all in 1 to 7999, hence we can trace the next term in the sequence a 1 1 4 4 = 8 0 0 0 . Continuing the sequence, a 1 1 4 5 = 8 0 0 5 a 1 1 4 6 = 8 0 0 6 a 1 1 4 7 = 8 0 0 8 a 1 1 4 8 = 8 0 0 9 a 1 1 4 9 = 8 0 4 4 a 1 1 5 0 = 8 0 4 5 a 1 1 5 1 = 8 0 4 7 a 1 1 5 2 = 8 0 4 8 a 1 1 5 3 = 8 0 5 0
We have found our answer, a 1 1 5 3 = 8 0 5 0 .
By the way, you might wonder how did I know to consider 1 to 7999. If you've solved Number Discrimination 2 , you'll know that a 1 to a 1 6 0 0 are all in 1 to 9999, and a 1 1 5 3 is somewhat closer to a 1 6 0 0 = 9 9 9 8 , we can guess that a 1 1 5 3 is somewhere between 7000 and 9998.
If you however didn't solve that other problem, well, there's always trial and error. :P
Problem Loading...
Note Loading...
Set Loading...
You must attempt Number Discrimination 2 first before attempting this. In that problem, the answer is 1 6 0 0 . So, there are 1 6 0 0 positive integers smaller than 1 0 0 0 0 which satisfy the properties above.
The question above is asking for a 1 1 5 3 when the numbers are arranged in ascending order. Considering the difference between 1 1 5 3 and 1 6 0 0 is smaller compared to the difference between 4 and 1 1 5 3 , we go for reversing method. Yup, just like how you reverse your vehicle.
We know that numbers smaller than 1 0 0 0 0 have a maximum of four digits. So, we look at the case when the first digit is 9 and there are four digits. Among them, we hope to eliminate multiples of 3 .
By divisibility rule , the sum of digits of a multiple of 3 is also a multiple of 3 .
9 is divisible by 3 . So, it follows that the remaining 3 digits must sum up to a multiple of 3 .
We know that the digits that can be used are 0 , 4 , 5 , 6 , 7 , 8 , 9 only, having 7 possible choices.
0 ≡ 0 ( m o d 3 ) , 4 ≡ 1 ( m o d 3 ) , 5 ≡ 2 ( m o d 3 ) , 6 ≡ 0 ( m o d 3 ) , 7 ≡ 1 ( m o d 3 ) , 8 ≡ 2 ( m o d 3 ) , 9 ≡ 0 ( m o d 3 )
Now, we are finding multiples of 3 using the sum of 0 , 1 , 2 three times.
Only the following combinations are possible:
0 + 0 + 0 , 0 + 1 + 2 , 1 + 1 + 1 , 2 + 2 + 2
For 0 + 0 + 0 , the number of integers are 3 ⋅ 3 ⋅ 3 = 2 7
For 0 + 1 + 2 , the number of integers are 3 ⋅ 2 ⋅ 2 ⋅ 3 ! = 7 2
For 1 + 1 + 1 , the number of integers are 2 ⋅ 2 ⋅ 2 = 8
For 2 + 2 + 2 , the number of integers are 2 ⋅ 2 ⋅ 2 = 8
So, the number of remaining which meet our requirements = 7 3 − 2 7 − 7 2 − 8 − 8 = 2 2 8
Now, we look at the case when the first digit is 8 and there are four digits. Among them, we hope to eliminate multiples of 3 .
By divisibility rule , the sum of digits of a multiple of 3 is also a multiple of 3 .
8 leaves a remainder of 2 when divided by 3 . So, it follows that the remaining 3 digits must sum up to a number which leaves a remainder of 1 when divided by 3 .
We know that the digits that can be used are 0 , 4 , 5 , 6 , 7 , 8 , 9 only, having 7 possible choices.
0 ≡ 0 ( m o d 3 ) , 4 ≡ 1 ( m o d 3 ) , 5 ≡ 2 ( m o d 3 ) , 6 ≡ 0 ( m o d 3 ) , 7 ≡ 1 ( m o d 3 ) , 8 ≡ 2 ( m o d 3 ) , 9 ≡ 0 ( m o d 3 )
Now, we are finding numbers which leave a remainder of 1 when divided by 3 using the sum of 0 , 1 , 2 three times.
Only the following combinations are possible:
0 + 0 + 1 , 0 + 2 + 2 , 1 + 1 + 2
For 0 + 0 + 1 , the number of integers are 3 ⋅ 3 ⋅ 2 ⋅ 2 ! 3 ! = 5 4
For 0 + 2 + 2 , the number of integers are 3 ⋅ 2 ⋅ 2 ⋅ 2 ! 3 ! = 3 6
For 1 + 1 + 2 , the number of integers are 2 ⋅ 2 ⋅ 2 ⋅ 2 ! 3 ! = 2 4
So, the number of remaining which meet our requirements = 7 3 − 5 4 − 3 6 − 2 4 = 2 2 9
∴ the number of integers meeting our requirements ranging from 8 0 0 0 to 9 0 0 0 = 2 2 9 + 2 2 8 = 4 5 7
We then perform the following operation: 1 6 0 0 − 4 5 7 = 1 1 4 3 .
This shows that the number of integers meeting our requirements but smaller than 8 0 0 0 = 1 1 4 3 . It is somewhat close to 1 1 5 3 .
Now, we push forward our list.
The numbers not smaller than 8000 that meet our requirements are 8 0 0 0 , 8 0 0 5 , 8 0 0 6 , 8 0 0 8 , 8 0 0 9 , 8 0 4 4 , 8 0 4 5 , 8 0 4 7 , 8 0 4 8 , 8 0 5 0 , . . .
8 0 5 0 is indeed the value of a 1 1 5 3 we are looking for!