Hey it's a me again @drifter1!
Today we continue with Mathematics, and more specifically the "Number Theory" series, in order to get into Divisibility. It's a very important concept, which needs to be covered before we can get into more complicated ideas.
So, without further ado, let's get straight into it!
Let's consider any two natural numbers a and b. Dividing these two numbers gives us a quotient q and remainder r. For example, dividing any a by b can be written as:
If the remainder r is zero or otherwise the result of division is a so called "whole" number, then b divides a exactly, or a is said to be divisible by b.
For example, dividing 8 by 2 yields 4, and so 8 is divisible by 2 or 2 divides 8.
Mathematically, we commonly denote the "divides" word by a vertical line "|" and so "2 divides 8" becomes "2 | 8".
So, let's now use this notation to specify the concept of divisibility.
For any two natural numbers a and b we say that b | a if there exists an natural c so that bc = a, where c is the "whole" number result (or quotient) of the division: a ÷ b with no remainder.
Note: The concept of divisibility also applies to integers. For example, it's allowed to write "2 | -8" as 2 divides -8. But, we will be covering mostly positive integers (or naturals) during the series.
Numbers are so fascinating that there exist some very basic rules which can be used in order to check if a specific number is divisible by another:
Of course any natural number is divisible by 1 and itself.
Zero is divisible by any number other then itself.
Any number with 0, 2, 4, 6, or 8 as last digit is divisible by 2.
Any number with sum of digits divisible by 3 is also divisible by 3.
Any number where the last two digits are divisible by 4 is also divisible by 4.
Any number with 0 or 5 as last digit is divisible by 5.
Any even (divisible by 2) number which is divisible by 3 is also divisible by 6 (both 2-rule and 3-rule).
If doubling the last digit and substracting it from the number made by the other digits of a number is divisible by 7 then the number is also divisible by 7.
Any number is divisble by 8 if its last three digits are divisible by 8.
Any number with sum of digits divisible by 9 is also divisible by 9.
Any number which ends with 0 is divisible by 10.
If the result of adding and subtracting digits in alternating pattern (add-subtract-add-subtract) is divisible by 11 than the number is divisible by 11.
Any number which is divisible by both 3 and 4 is also divisible by 12.
Exercise:
Try to check if 5280 is divisible by 2-to-12 by applying these rules. Have fun!
Mathematical equations used in this article, have been generated using quicklatex.
Block diagrams and other visualizations were made using draw.io.
And this is actually it for today's post!
Next time we will cover the Euclidean Division Algorithm, which was already in this article as an Easter egg. Can you spot it?
See ya!

Keep on drifting!