Divisibility
Suppose we have 26 counters and put four in each packet, without breaking a counter. We want to know how many packets we can fill, whether any counters remain, and how to describe the result precisely. Number theory begins with questions about whole numbers like these. It asks not only for an answer, but why that answer must be right.
We will move from packets to common divisors, primes and complete proofs. We will explain each new symbol as we need it. The diagrams keep the quantities visible; when we claim something for every integer, we will give an argument as well as examples.
01Start with one complete packet
The positive integers 1, 2, 3, … count whole objects. Include 0 and the negative numbers , … and we obtain the integers, often denoted by . Negative integers can record an opposite direction or a decrease; they do not mean a negative fraction of a counter. Our packet picture will begin with nonnegative quantities, meaning zero or a positive integer.
Press “Next packing step” below. Each press puts four counters into a complete packet. A teal group is one packet; grey counters are still waiting. Six packets use counters. Subtracting 24 from 26 leaves 2. Since 2 is less than the four needed for another packet, we must stop. The last step marks those two in gold: they are now the remainder. Press “Pack one at a time” to play, “Next packing step” to move one packet, and “Reset animation” to start over. Changing either quantity starts the construction again.
Complete packets
No packet has been filled yet.
Still waiting to be packed
Only call the unallocated counters the remainder after there are fewer than . The last step checks this condition.
Change the total to 24 while keeping four in each packet. We get exactly six packets: , with nothing left. We write this whole-number relationship as , read “4 divides 24”. The vertical line is not a division sign. It states something that can be true or false. The statement is true, while is false. The calculation is valid, but 6.5 is not an integer number of complete packets.
Here is the size of a part, is the total and is the integer multiplier. This is a definition: it says what divisibility means, rather than claiming something we must prove. “Some integer ” means at least one suitable integer, not every integer. For , the witness is because . To see why 5 does not divide 12, compare neighbouring multiples: . There is no integer between 2 and 3, so there is no suitable .
The equation definition goes further than our picture. We have because ; because ; and because . Every nonzero integer therefore divides 0, and a negative sign need not prevent divisibility. The divisors and divide exactly the same integers: replace the multiplier by .
02A remainder, and why it is unique
Our 26 counters gave six packets of four and two left over, so . The number of complete packets, 6, is the quotient; the final leftover, 2, is the remainder. The equation alone is not enough: 26 also equals , but those six leftovers can fill another packet. To record a finished division, the remainder must be at least zero and strictly smaller than the divisor.
For positive we can keep removing until fewer than remain. What about negative ? Dividing by 5 does not give as our standard remainder. Place between the neighbouring multiples and . Starting from the left multiple , move three units right to reach . Thus : the quotient is and the remainder is 3, with . The remainder records a position inside a length-five interval on the number line.
Why can every integer be written this way? Mark all the multiples of on the number line: …, , …, each apart from the next. Then lies in one gap, from some multiple up to, but not including, the next multiple . Call its distance to the right of . Then with . The example was exactly this: it lies between and , three units from .
Optional: a proof of existence that does not rely on the number-line picture
Let us prove existence for every integer and every positive integer . We use a basic property of the integers: any nonempty collection of nonnegative integers has a least member. This is a starting property of their ordered steps 0, 1, 2, …; it is not a property we assume for all numbers. For example, the positive real numbers have no least member, because half of any positive number is smaller and still positive.
Consider the nonnegative integers of the form . There is at least one: choose , giving . If this is nonnegative. If , write to get , again nonnegative because . Here is the distance from to zero. Choose the smallest candidate and retain the integer that produced it. We now have with .
If , remove one more . Then , and it is another candidate because , with an integer. But , contradicting our choice of the smallest candidate. Therefore . This proves existence. The contradiction argument temporarily assumes the opposite situation and shows why it cannot occur.
Why two different answers cannot both satisfy the rule
Try it with numbers first: 26 can also be written , but the six left over can fill another packet, so that version is not allowed. The remainder must be smaller than one packet, so there is only one answer. The letters below say the same thing again; skip them if you like.Suppose the same has two permitted descriptions, , with both remainders between 0 and . Subtract and to get . The right side lies strictly between and . The left side is an integer multiple of : if it is at least ; if it is at most . Only can fit inside that range. Hence , and substituting back gives . Both answers are unique.
Consequently exactly when the standard remainder is zero. A zero remainder gives , which is the definition of divisibility. Conversely, if , the pair already satisfies the remainder rules. Uniqueness forces the standard remainder to be zero. “Exactly when”, or “if and only if”, makes a claim in both directions; we have checked each one.
03Turn divisibility into useful equations
When we see , we can replace it with for an integer . That equation lets us calculate. For example, and mean and . Adding gives , so 6 divides the sum. Subtracting gives , so it divides the difference too.
Here is the general argument. If and , choose any integers and . Then . The expression is an integer because sums and products of integers are integers. Thus . We call an integer linear combination of and : we add integer multiples of the two numbers. Negative multiples are allowed, so this includes subtraction.
We can also follow a chain of multiples. If and , write and . Substitute the first into the second: . Since is an integer, . For instance, and give . This property is called transitivity; the reason is the integer equation we just constructed.
Do not reverse a rule without checking it. The number 6 divides , but divides neither 2 nor 3. Dividing a product therefore does not generally imply dividing one factor. One counterexample disproves an “always” claim, while a hundred successful examples do not prove it for every integer. Later we will find a condition that makes this inference valid.
04Why common divisors survive
Sometimes we want the same packet size to divide two quantities without leftovers. The positive divisors of 18 are 1, 2, 3, 6, 9 and 18. Those of 30 are 1, 2, 3, 5, 6, 10, 15 and 30. We can pair them as and . Test each positive candidate from 1 up to the input; keep exactly those that divide it with no remainder. That gives the complete list. No larger positive divisor is possible, and the next paragraph explains why. For 18: , , — the paired factors have all appeared. The shared entries 1, 2, 3 and 6 are their common divisors; the greatest is 6. We write , where abbreviates greatest common divisor.
Why does a greatest common divisor exist? For positive and , the number 1 divides both, so the list is nonempty. If a positive divides , the multiplier in must be a positive integer, at least 1; hence . Similarly . Common divisors therefore lie in a finite list from 1 to the smaller input, so a greatest one exists. Numbers whose is 1 are called coprime; this does not say that each number must itself be prime.
Listing all divisors becomes slow for larger numbers. We want to replace a pair by smaller numbers without losing any common divisor. Try 84 and 30: . Removing two copies of 30 leaves 24. Each “Next division” below cuts the dividend into complete copies of the divisor and a gold remainder, keeping the same length scale. The next pair is the divisor and the remainder. Earlier equations remain in the table, and you can go back or reset.
| Step | Division | Pair kept |
|---|
The scale stays fixed as you step through one calculation. Blue-green pieces are complete copies of the divisor; gold is what remains. A zero quotient means no full copy fits. The list checks this example; the proof explains every positive input.
Prove that the replacement preserves the whole list
First take a common divisor of 84 and 30. It divides the integer combination , so it is a common divisor of 30 and 24. Conversely, a common divisor of 30 and 24 divides , so it also divides 84 and 30. We have preserved the entire list in both directions, not merely happened to retain its largest entry. The greatest entries must therefore agree.
For the general equation, a common divisor of and divides ; a common divisor of and divides . Repeating the replacement takes (84,30) to (30,24), then (24,6), then (6,0). The three divisions are and .
Why stop here? Every nonzero integer divides 0, so the positive common divisors of 6 and 0 are exactly the divisors of 6, with greatest member 6. Every row preserved the common divisors, hence is also 6. More generally for positive a. This repeated division is the Euclidean algorithm. It must stop: each new remainder is a nonnegative integer strictly smaller than the current positive divisor. We cannot descend strictly forever within the finite list 0, 1, …, . The zero remainder is not the answer; the answer is the last nonzero number before it.
05Trace the remainder back to the original numbers
The algorithm gives more than the answer 6. It records how each remainder came from the preceding pair. We want to express 6 using only the original 84 and 30. Then any divisor of those inputs must also divide this expression. Begin with . The 24 is not an original input, but the first row says . Substitute that whole expression for 24.
The minus sign before the bracket acts on every term inside: subtracting “84 minus two copies of 30” means subtracting 84 and adding back those two copies. The strips below show these calculations: 84 minus two copies of 30 gives the remainder; 30 minus that remainder gives the next length. After substitution, the three copies of 30 can be joined to check the result. Dashed red marks the removed length and gold marks what remains. Selecting a step holds the picture still so we can compare it with the algebra.
The dashed red length is removed from the whole bar; gold remains. In the last picture three 30-unit bars make 90. Removing 84 leaves 6. Thus the coefficient means subtract one copy of 84; it does not mean a bar with negative length.
and are the two numbers kept at this step; , , and record how many copies of and each one contains. When the letters get heavy, look at the worked numbers below and come back.Why does this work for other positive inputs? Initially and are integer combinations. If the current pair is and , the next remainder equals . Its coefficients are still integers. Thus both original inputs and every number retained later keep this form. The last nonzero number can be an initial input: in , the answer 3 equals rather than a newly computed nonzero remainder. Together with the algorithm proof, this gives integers and satisfying . This is Bézout’s identity. It comes from the records of the divisions.
The condition that lets us separate a product
Return to the inference about a product. Now suppose and . Bézout gives . Multiply by so that the known product appears: . The first term is a multiple of a. The second is too: write for an integer , so . Adding gives , with an integer in brackets. Hence . The coprime condition matters: without it we cannot start with the identity equal to 1.
For example, 4 and 9 are coprime: , so any positive common divisor divides 1 and must be 1. If , then ; explicitly is a difference of multiples of 4. By contrast, does not imply , because . The required condition is absent.
06Why primes are the pieces of multiplication
Write , then split 6 into and 10 into . We obtain . The notation abbreviates two copies of 2 multiplied together. Each final factor is greater than 1 and has no positive divisor other than 1 and itself. It cannot be split into two positive integers both greater than 1. Such a number is prime. An integer greater than 1 that is not prime is composite; 1 is neither prime nor composite.
This convention keeps 1 out of the prime pieces. Allowing it would let us insert any number of extra factors 1 without changing the product, so the number of pieces could not be unique. Prime factorisation records the factors greater than 1. We must now prove two things: every integer greater than 1 can be fully split, and different routes cannot give different final prime pieces.
Existence: splitting cannot leave an unsplittable exception
Suppose some integer greater than 1 cannot be written as a product of primes. Choose the least such , using the least-member property again. It cannot be prime: a prime itself is a one-factor prime product. Thus is composite, so with and . Since , we get ; similarly . Both are smaller than the least exception, so each has a prime factorisation. Multiplying those factorizations produces one for , a contradiction. No exception exists.
Uniqueness: a prime factor must appear on both sides
We first need one tool. If a prime divides , either divides a or it does not. The first case already gives a factor it divides. In the second case, the only positive divisors of are 1 and , and is not a divisor of a. Hence . The coprime rule from the preceding section gives . Thus a prime dividing a product divides at least one factor. For a longer finite product, separate its first factor from the rest and repeat on the rest when necessary. The finite number of factors ensures we reach one that divides.
Suppose one positive integer has two prime factorizations. Take the first prime on the left. It divides the left product, hence the equal product on the right. The preceding argument says it divides some prime on the right. The only positive divisors of are 1 and ; since . Move to the front and divide both sides by the nonzero , removing a matching pair. Repeat for the remaining products until one side has no factors. The other must then have none either: an empty product is 1, but a nonempty product of primes is at least 2. Thus the prime factors and their numbers of occurrences agree, apart from order.
Existence together with uniqueness up to order is called the fundamental theorem of arithmetic. The name labels the result; its justification is the two arguments above. We now have a reason why counting copies of a prime factor does not depend on which splitting route we chose.
07Common copies and enough copies
Compare with . Check the latter step by step: . Each row below contains one kind of prime, and each chip is one factor in a product. Look at how many copies both columns can supply: two copies of 2, one of 3, and no shared copy of 5. Teal chips pair these common copies.
Each chip is one prime factor in a product, not that many counters added together. Teal chips can be paired across the two columns. The other chips are extra copies found in only one column. If a number is 1 its list is empty; an empty product equals 1, so it introduces no factor.
Why do copies determine divisibility? If , write with positive integer . Factor and and multiply. Uniqueness says that the count of each prime in plus its count in equals its count in a. Thus cannot contain more copies of any prime than a. Conversely, if needs no more of any prime than a contains, remove those copies from a’s factorisation. The remaining product is an integer , giving . Both directions hold.
To divide both inputs, we may take only the smaller count of each prime. Here the common product is . It divides both: and . Every other common divisor has no more copies of any prime than this product, so it divides 12 and cannot exceed 12. This proves , beyond what the picture alone suggests.
Now reverse the question: find the smallest positive integer that is a multiple of both 60 and 72. This is their least common multiple, abbreviated . To contain both inputs, it needs at least the larger count of each prime. Take . Indeed . Every other positive common multiple contains at least these copies, so it is a positive integer multiple of 360 and cannot be smaller. Hence . We require a positive multiple because zero is also a multiple of both and would change the question.
In general, suppose a prime occurs times in a and times in . The takes the smaller count and the the larger. Their product has copies: if this is ; otherwise it is . The product has that same count. Since this holds for each prime, uniqueness gives . Here .
08Use the tools in complete proofs
Example 1: consecutive integers have no common factor greater than 1
Take a positive integer . If a positive divides both and , it divides their difference . If divides 1, then with positive integers and , both at least 1. Only can give that product. Thus every positive common divisor is 1, and 1 does divide both, so . We kept arbitrary; the argument used only the difference of one.
Example 2: the product of three consecutive integers is divisible by 6
Take any integer , including negative ones, and put . First find a factor 2. Division with remainder says has remainder 0 or 1 when divided by 2. If , contains that factor. If , then does. Hence for an integer . These are all possible remainders, so there is no third case left unchecked.
Next find a factor 3. The possible remainders are 0, 1 and 2. If , is a multiple of 3. If , then . If , then . Hence . To combine the factors, recall and therefore . Since , the coprime rule gives , so . Substituting yields . That proves rather than merely asserting that separate divisibility by 2 and 3 is enough.
Example 3: a finite list cannot contain every prime
Suppose someone claims to have listed every prime as . The list is finite and includes at least the prime 2. Multiply its entries and add one: . Since , the factorisation existence proof guarantees a prime factor of . If were on the list, it would divide the product . It also divides , so it would divide their difference 1. But a prime cannot divide 1. Therefore is absent from the list, contradicting the claim of completeness. There cannot be only finitely many primes.
Notice exactly what we proved: has a prime factor outside the list, not that itself is always prime. For the list 2,3,5,7,11,13 successive products are 6, 30, 210, 2310, 30030, so the product plus one is 30031, and because . being composite does not harm the argument; a prime factor outside the list is enough. A proof should not claim more than its reasoning establishes.
09Practise with reasons
Try writing the reason for each answer before opening the solution. Check whether a rule was reversed without justification, whether any integer or remainder cases were missed, and whether each division was permitted.
1. Find the quotient and remainder of divided by 6.
The neighbouring multiples are and . Since is one more than , we have . The quotient is and the remainder 1, with . The expression is equal to , but is not a permitted remainder. Our uniqueness proof ensures there is only one permitted pair.
2. Find , then express it using 231 and 165.
Divide in order: ; ; . Each row preserves the common divisors, so the is the last nonzero remainder, 33. Substitute back: . Check . The proved product relation then gives .
3. If 6 divides and 10 divides , must 60 divide ? What is guaranteed?
No. The counterexample satisfies , but 60 does not divide 30: a positive multiple of 60 cannot be smaller than 60. What is guaranteed is , since and have least common multiple . Positive common multiples are multiples of 30; for negative apply that fact to and restore the sign. For use . The two conditions share one factor 2; we cannot count it twice without a reason.
4. Prove for every positive integer .
Let be any positive common divisor. Then and . To obtain a number independent of , subtract twice the first expression from the second: . Integer combinations preserve divisibility, so and . Since 1 does divide both inputs, their is 1. Subtracting twice was chosen to remove the two copies of , not as an unexplained trick.
We can now do more than count leftovers. The integer-multiple definition lets us combine equations; those combinations explain why the Euclidean algorithm preserves common divisors; and substitution back explains cancellation under a coprime condition. This chain will be useful for congruences and integer equations. The following pages will recall the needed reasoning where it is used, rather than requiring us to supply it from memory.
