Yahoo Answers is shutting down on 4 May 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

A question about the natural number N:?

n=162a8b is a number of 6 digits, where 0=<a,b<=b. Find all a & b

such that n can be properly divided by 7.

Update:

Correction: 0=<a,b<=9

4 Answers

Relevance
  • 2 months ago
    Favourite answer

    First, where you said 0 ≤ a,b ≤ *b* I assume you meant 0 ≤ a,b ≤ 9.

    There are several ways to approach this. Here's just one method.

    We can think of N as:

    162080 + 100a + b

    When we divide 162080 by 7, the remainder is 2. So the following expression will give the same remainder when divided by 7.

    100a + b + 2

    Also, since 98 is a multiple of 7, we can drop 98a. This will also give the same remainder when divided by 7.

    2a + b + 2

    Now we can easily plug in a = 0 to 9 and calculate the possible values of b where the remainder is 0.

    a = 0 --> b = 5

    a = 1 --> b = 3

    a = 2 --> b = 1 or 8

    a = 3 --> b = 6

    a = 4 --> b = 4

    a = 5 --> b = 2 or 9

    a = 6 --> b = 0 or 7

    a = 7 --> b = 5

    a = 8 --> b = 3

    a = 9 --> b = 1 or 8

    Answers:

    162085

    162183

    162281

    162288

    162386

    162484

    162582

    162589

    162680

    162687

    162785

    162883

    162981

    162988

    P.S. Another way is brute force all 100 choices of a (0-9) and b(0-9) and test them for divisibility by 7. I did this also and it concurs with my answers above.

  • 2 months ago

    n=162a8b=162080+100a+b, 0=<a,b<=9

    If b is removed, then n->n'=162a8. Let

    16208+10a-2b=0(mod 7), then

    10a=(2b-16208)(mod 7)-----(1)

    Now try b=0,1,2,...,9 in turn in (1) & find "a" accordingly.

    The results are as listed:

    | b |-----0-----|-----1-----|-----1-----|-----2-----|-----3-----|-----3-----|

    | a |-----6-----|-----2-----|-----9-----|-----5-----|-----1-----|-----8-----|

    | n | 162680 | 162281 | 162981 | 162582 | 162183 | 165883 |

    | b |-----4-----|-----5-----|-----5-----|-----6-----|-----7-----|-----8-----|

    | a |-----4-----|-----0-----|-----7-----|-----3-----|-----6-----|-----2-----|

    | n | 162484 | 162085 | 162785 | 162386 | 162687 | 162288 |

    | b |-----8-----|-----9-----|

    | a |-----9-----|-----5-----|

    | n | 162988 | 162589 |

    For examples,

    (i) From (1), input b=3, then

    10a=-16202(mod 7)=>

    10a=3(mod 7)=>

    a=1(mod 7)=>

    a=1+7k=>

    a=1, k=0

    a=8, k=1

    =>

    n=162183 or n=165883

    (ii) input b=5, then

    10a=-16198(mod 7)=>

    10a=0(mod 7)=>

    a=0+7k=>

    a=0, k=0

    a=7, k=1

    =>

    n=162085 or n=162785

    etc.

    If using the method of "trial & error", we

    need to try at least 10*10=100 times.

  • 2 months ago

    You mistyped this, where you wrote b<=b.  Maybe you meant b<=9 ?

    This is a pretty simple problem, you can start at 162085 (which is a multiple of 7) and just keep adding either 7 or 98, depending on whether adding the 7 makes the "8" turn into a "9".

    For instance 162085 + 7 is too much, so you go next to

    162085 + 98 = 162183.

    Then 162183 + 7 is too much, so you next go to

    162183 + 98 = 162281.

    Then 162281 + 7 is okay, your next success is

    162288.

    Then 162288 + 98 = 162386.

    et cetera!

    Pretty soon you get above 163000 so you have to stop.

  • ?
    Lv 7
    2 months ago

    Every seven numbers, one of them is divisible by 7. So consider

    162080.

    Which is the first number divisible by 7? [ you only have the seven first to try].

    Answer that, then we will take it from there...

Still have questions? Get answers by asking now.