Find the sum of 6-digit numbers consisting of only numbers 5 and/or 7 and is divisible by 35.
Example: 335535 is a 6-digit number consisting of 3 and 5 and divisible by 15.
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.
It's obvious that the last digit is 5 else it wouldn't be divisible 5 or 3 5 . It's just left to check how do we arrange the remaining 5 numbers such that it is also divisible by 7.
Of course, the most no-brainer way to is fill in A B C D E 5 with A , B , C , D , E as 5 or 7 only. Which is a total of 2 5 = 3 2 ways. But that gets a little bit tedious.
We can apply one of divisibility rule of 7 : "Form the alternating sum of blocks of three from right to left".
We must find ( D E 5 − A B C ) m o d 7 = 0 . Or ( ( 1 0 0 D + 1 0 E + 5 ) − ( 1 0 0 A + 1 0 B + C ) ) ≡ 2 ( A − D ) + 3 ( E − B ) + ( 5 − C ) .
Because A , B , C , D , E are only limited to 5 , 7 . the possible values are restricted to:
A − D = 0 , 2 , − 2 E − B = 0 , 2 , − 2 5 − C = 0 , − 2
Or
2 ( A − D ) = 0 , 4 , − 4 3 ( E − B ) = 0 , 6 , − 6 5 − C = 0 , − 2
Taking S 1 , S 2 , S 3 as the possible values of 2 ( A − D ) , 3 ( E − B ) , 5 − C respectively. We want to match up values of S 1 + S 2 + S 3 such that it is a multiple of 7 .
A simple case by case shows that ( S 1 , S 2 , S 3 ) = ( 0 , 0 , 0 ) , ( − 4 , 6 , − 2 ) only.
Case 1 : If ( S 1 , S 2 , S 3 ) = ( 0 , 0 , 0 ) . Then A = D , B = E , C = 5 . Then, which means there are 2 × 2 × 1 = 4 solution, namely: 5 5 5 5 5 5 , 5 7 5 5 7 5 , 7 5 5 7 5 5 , 7 7 5 7 7 5 .
Case 2 : If ( S 1 , S 2 , S 3 ) = ( − 4 , 6 , − 2 ) . Then A = 7 , D = 5 , E = 7 , B = 5 , C = 7 , the number is only 7 5 7 5 7 5 .
Adding all these numbers up gives: ( 5 5 5 5 5 5 × 5 ) + ( 2 0 0 2 0 + 2 0 0 2 0 0 + 2 2 0 2 2 0 + 2 0 2 0 2 0 ) = 3 4 2 0 2 3 5 .