Note : 2 numbers a and b are relatively prime (also called coprimes if GCD(a,b) =1
Let us take the largest no 9876543210. This number is divisible by both 2 and 3. Any permutation shall be divisible by 3 so one digit has to be removed. The one digit number should not be divisible by 3.
The digit that came be removed are 1,2,4,5,7,8.
To keep the number as large as possible the lower digit need to be removed
Let us remove 1 the smallest digit
So we get 987654320
This is not divisible by 3.But it is divisible by 2
For the number to be odd (that is not divisible by 2) we need an odd digit in unit place
So we get 987654203
We next try to find a larger number if it exists
1st six digits 987654 cannot be changed as if we change we shall have a smaller number
So only change possible is is in 3 digits must contain 0 3(removing them shall not affect as it shall remain divisible by 3) and either 1 or 2 (either can be removed to make non multiple of 3)
203. larger numbers are 230( discarded as it is even), 301, 302( discarded as even)
So the number is 301 and the original required number is 987654301
No comments:
Post a Comment