Question 874953:  find the smallest 7 digit mumber formed by 0,1,2,3 and 5 completely divisible by 198? 
 
 Answer by KMST(5328)      (Show Source): 
You can  put this solution on YOUR website! The way I understand the problem, 
all the digits listed are required (they have to be in the number), 
and no other digits are allowed. 
  
  so the number must be a multiple of   ,   and  . 
  
Including only allowed digits, to be a multiple of   , 
the number must end in   or   . 
  
To be a multiple of   the number's digits must add to a multiple of   . 
Since the required digits add up to   , 
the sum of all digits cannot add to   . 
With two more digits the only other multiple of   possible for that sum is 
  . 
The two extra digits must add to   , so they must be 
  and   . 
So, the seven digits are 
  ,   ,   ,   ,   ,   , and   . 
  
For a 7 digit number to be a multiple of   , 
the sum of the 1st, 3rd, 5th, and 7th digits,   , 
and the sum of the 2nd, 4th, and 6th digits,   , 
must differ by   or a multiple of   . 
In this case, since both sums add to   , 
the difference could only be   or   , 
not   or other multiples.  
So, while we know that   , 
the sums must also satisfy 
  or   or   . 
Since the systems formed by   or   , 
along with   , do not have integer results, 
the system we have to solve is 
  . 
Its solution is   . 
We need to separate the digits to be used, 
  ,   ,   ,   ,   ,   , and   , 
into two groups: 
a group of 4 digits that add up to   , 
and a group of 3 digits that add up to   . 
With those digits, the only ways to get a group of 3 digits that add up to   is 
  or   . 
One of those groups of digits will include   ,   , and   , 
and the other group will include   ,   , and   . 
The required   will have to be added to one of those groups to get the group of 4 digits that will be the 1st, 3rd, 5th, and 7th digits. 
  
To get the smallest possible number, we would want the first digit to be   , 
so the 1st, 3rd, 5th, and 7th digits must include 
  ,   ,   , and   . 
We are choosing   as the 1st digit. 
We need to use   as the 7th and last digit, 
because the number must be a multiple of   . 
Regarding the 3rd, and 5th digits, the number will be smallest if 
  is the 3rd digit, 
and   is the 5th digit. 
So the 1st, 3rd, 5th, and 7th digits are 
  ,   ,   , and   , in that order. 
  
Regarding the 2nd, 4th, and 6th digits, which must include 
  ,   , and   , 
we get the smallest number if we use them in that order. 
  
So, the number is   . 
  | 
 
  
 
 |   
 
 |