Math, asked by johnspartan3714, 6 months ago

To be divisible by the second number what smallest number should be added to the first

Answers

Answered by ArjunSanju
1

Answer:

You have two numbers (let’s assume positive integers) a and b .

We’re going to be dividing by b and want to adjust a so that it becomes divisible by b .

What’s the smallest number, c , we must add to a so that a+c is divisible by b ?

Well first, we find the remainder, r , when b is divided by a .

The remainder is r=a−nb where n is the greatest integer such that nb≤a .

There are many ways of finding this remainder; long division, modular arithmetic, guesswork, etc. On a calculator you can divide a by b , then subtract the integer before the decimal point leaving only the decimals after the point and multiply that by b ; the result is the remainder when a is divided by b .

The thing about the remainder is that it will be an integer, r , with 0≤r<b .

Once you have the remainder, you can calculate the smallest number which must be added to a in order to make it divisible by b .

If the remainder is zero then a is already divisible by b so you don’t need to add anything. You can add zero if you like but it doesn’t make any difference.

If the remainder is non zero, we calculate our number c=b−r . This number c can be added to a and the result will be divisible by b as follows:

a+c=a+b−r (because c=b−r )

=a+b−(a−nb) (because r=a−nb )

=(n+1)b (which is obviously a multiple of b )

I will not go into the details of why this number c is the smallest that will do the job. See if you can prove it.

Similar questions