cjcj wrote:
What is the remainder of n/15?
(1) Remainder of n/5 is 4
(2) Remainder of n/6 is 5
Hi cjcj,
(1) First statement tells us that
n=5q+4, where q is a non-negative integer. You can tell right away this alone is insufficient when dividing by 15.
(2) Second statement tells us that
n=6p+5, where p is a non-negative integer. You can tell right away this alone is insufficient when dividing by 15.
Combining both statements, you can find a common equation. See Bunuel's post to see how to do that:
when-positive-integer-n-is-divided-by-5-the-remainder-is-90442.html#p722552First few terms of n, when n=5q+4, is 4,9,14,19,24,29,34
First few terms of n, when n=6p+5, is 5,11,17,23,29,35
First common term is 29. So the general equation will be a multiple of the
lcm of 5 and 6, which is 30 plus 29. So the new equation of n after combining is
n=30z+29, where z is a non-negative integer. At this point it should be obvious that this statement is sufficient because n is equal to 29 more than a multiple of 15.
n=15*(2z)+15+14 -->
n=15*(2z+1)+14, so because n is equal to 14 more than a multiple of 15, the remainder will always be 14.
I actually don't even factor as I have done above. I like to look at the individual remainders of the terms when dividing by the divisor and then combine using the operation in question and then find the remainder after that. For example:
(30*z)/15 yields a remainder of 0. 29/15 yields a remainder of 14. Combine 0 and 14 by addition because the operation in question is addition and then divide by 15 and find the remainder.
For example let's say you wanted to find the remainder of \(\frac{(18*23)}{7}\). Mod(\(\frac{18}{7}\)) is 4. Mod(\(\frac{23}{7}\)) is 2. Combine 4 and 2 by multiplication because the operation in question is multiplication and then find the remainder. So the remainder of \(\frac{(4*2)}{7}\) is 1 and this is the answer.
This can be done with negative remainders too. For example let's say you wanted to find the remainder of \(\frac{(23-18)}{7}\). Combine 2 and 4 by subtraction and then find the remainder. So the remainder of \(\frac{(2-4)}{7}\) is 5. When you have a negative remainder, find the remainder first as if the numerator was positive and then subtract from the divisor.
If you had positive 2 on top, the remainder would have been 2, but you have negative 2, so subtract positive 2 from 7 and you get a remainder of 5.