One of the "shortcuts" for determining if a number is divisible by 8 is to see if the last three digits are divisible by 8. One of the "shortcuts" for determining if a number is divisible by 5 is to see whether the last digit is a 5 or a 0. If I have a number of arbitrary length, is it acceptable to say that the number is divisible by 40 if the number passes both shortcuts?

  • 1
    $\begingroup$ Yes. Since $\gcd(8, 5)=1$, then if $8|k$ and $5|k$, it follows that $40|k$. $\endgroup$ – Alex Wertheim Dec 19 '14 at 16:48
  • $\begingroup$ Actually the gcd is only needed if you want to state a sufficient condition. If $a$ and $b$ divide $n$, then $ab$ divides $n$. $\endgroup$ – Henrik - stop hurting Monica Dec 19 '14 at 16:52
  • $\begingroup$ @Henrik, this is not always true, unless I am understanding you wrong. Both 6 and 2 divide 18, however 2*6=12 does not divide 18. $\endgroup$ – Dasherman Dec 19 '14 at 16:56
  • $\begingroup$ But if 6 and 2 were coprime (I realize they are not), then Henrick's statement would be correct? $\endgroup$ – Kenneth K. Dec 19 '14 at 17:09
  • $\begingroup$ "..last three digits..", not "numbers". $\endgroup$ – user26486 Dec 19 '14 at 17:16

Yes, since $8$ and $5$ are coprime $(\gcd(8, 5)=1)$. This means that such an integer can be written as $8\times 5\times n=40\times n$, for some integer $n$.


To offer some clarity towards Henrik's point:

It is true that if a|n and b|n then if gcd(a,b)=1 then (ab)|n.

However, we may generalize somewhat, and note that lcm(a,b) = (ab)/gcd(a,b) will always divide n, provided that both a|n and b|n


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.