Wanna dare do this?

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.


The answer is 3420235.

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.

2 solutions

Pi Han Goh
Apr 19, 2015

It's obvious that the last digit is 5 5 else it wouldn't be divisible 5 5 or 35 35 . 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 \overline{ABCDE5} with A , B , C , D , E A,B,C,D,E as 5 5 or 7 7 only. Which is a total of 2 5 = 32 2^5 = 32 ways. But that gets a little bit tedious.

We can apply one of divisibility rule of 7 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 \bigg ( \overline{DE5} - \overline{ABC} \bigg) \bmod 7 = 0 . Or ( ( 100 D + 10 E + 5 ) ( 100 A + 10 B + C ) ) 2 ( A D ) + 3 ( E B ) + ( 5 C ) \bigg ( (100D + 10E + 5) - (100A+ 10B + C) \bigg) \\ \equiv 2(A-D) + 3(E-B) + (5-C) .

Because A , B , C , D , E A,B,C,D,E are only limited to 5 , 7 5,7 . the possible values are restricted to:

A D = 0 , 2 , 2 E B = 0 , 2 , 2 5 C = 0 , 2 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 2(A-D) = 0,4,-4 \\ 3(E-B) = 0, 6, -6 \\ 5-C = 0, -2 \\

Taking S 1 , S 2 , S 3 S_1, S_2, S_3 as the possible values of 2 ( A D ) , 3 ( E B ) , 5 C 2(A-D),3(E-B), 5-C respectively. We want to match up values of S 1 + S 2 + S 3 S_1 + S_2 + S_3 such that it is a multiple of 7 7 .

A simple case by case shows that ( S 1 , S 2 , S 3 ) = ( 0 , 0 , 0 ) , ( 4 , 6 , 2 ) (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 ) (S_1,S_2,S_3) = (0,0,0) . Then A = D A=D , B = E B=E , C = 5 C = 5 . Then, which means there are 2 × 2 × 1 = 4 2 \times 2 \times 1 = 4 solution, namely: 555555 , 575575 , 755755 , 775775 555555,575575,755755,775775 .

Case 2 : If ( S 1 , S 2 , S 3 ) = ( 4 , 6 , 2 ) (S_1,S_2,S_3) = (-4,6,-2) . Then A = 7 , D = 5 A =7, D = 5 , E = 7 , B = 5 E = 7, B =5 , C = 7 C = 7 , the number is only 757575 757575 .

Adding all these numbers up gives: ( 555555 × 5 ) + ( 20020 + 200200 + 220220 + 202020 ) = 3420235 (555555 \times 5) + (20020 + 200200 +220220 + 202020) = \boxed{3420235} .

Pranjal Jain
Dec 24, 2014

The possible numbers are

  • 575575
  • 757575
  • 755755
  • 775775
  • 555555

Anyone like to prove?

Thanks to one who reported the question for "5 and 7" which is corrected now to "5 or 7"

Thanks for updating the problem.

Those who previously answered 2864680 because they left out 555555 have been marked correct.

Calvin Lin Staff - 6 years, 5 months ago

please pranjal, dont say that we will have to check all the possibilities.Give a solid solution for this problem.

rahul saxena - 6 years, 1 month ago

Log in to reply

Look Pi Han Goh's solution

Pranjal Jain - 6 years, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...