Divisibility and Prime Factorization
Section titled “Divisibility and Prime Factorization”For integers and , the notation means for some integer . If divides both and , it divides every integer combination . This lets us replace large expressions by smaller differences.
Every integer greater than one has a unique factorization into primes, apart from the order of the factors. Divisibility can therefore be checked one prime at a time: for positive integers exactly when every prime exponent in is at most the corresponding exponent in .
Example. A positive integer satisfies . Find all possible .
Because , subtracting gives . Thus . Conversely, every positive divisor of divides , so all four values work.
GCD, LCM, and the Euclidean Algorithm
Section titled “GCD, LCM, and the Euclidean Algorithm”The greatest common divisor takes the smaller exponent of each prime in positive . The least common multiple takes the larger. Thus
Factoring is not always the fastest way to find a GCD. The Euclidean algorithm repeatedly uses
The common divisors stay the same when a multiple of one number is subtracted from the other.
Example. Find and express it as an integer combination of the two numbers.
The divisions are
The last nonzero remainder is . Substituting backward,
Thus the GCD is , with the displayed integer combination.
Bézout’s identity says that such a combination always exists:
for some integers . In particular, if and , then : multiply a Bézout combination of by . This is the correct cancellation rule for divisibility.
Counting and Summing Divisors
Section titled “Counting and Summing Divisors”If , each positive divisor chooses its exponent of independently from . Therefore
Multiplying the possible prime-power contributions instead of just counting them gives the divisor sum:
Example. Find the number and sum of the positive divisors of .
Factor . Thus
Divisors also pair as and . A positive integer has an odd number of divisors exactly when it is a square, because only a square has a divisor paired with itself.
Perfect Powers and Coprimality
Section titled “Perfect Powers and Coprimality”A positive integer is a perfect th power exactly when all its prime exponents are divisible by . This turns questions about squares and cubes into remainder calculations on exponents.
Example. Find the smallest positive integer for which is a square.
The exponents in must all become even. Add one factor of and one factor of , giving and . Any successful must contain both of those factors, so is smallest.
If coprime positive integers have a square product, each is a square: no prime is shared, so an odd exponent in one cannot be repaired by the other. The same statement holds for any perfect th power.
Example. Find all positive integers for which is a square.
Consecutive integers are coprime, so both and would have to be squares. Then
The only nonnegative square solution is , which gives and violates positivity. Thus no positive works.
GCDs of Algebraic Expressions
Section titled “GCDs of Algebraic Expressions”The Euclidean algorithm applies to expressions as well as numerical inputs. The useful move is still subtracting an integer multiple, chosen so that the largest terms cancel. A complicated GCD can collapse to a small constant or a familiar expression.
For positive and integer ,
If , subtract from to replace the first exponent by . The common divisors are unchanged. Repeating the subtraction follows the Euclidean algorithm on the exponents, ending at their GCD.
Example. Find without evaluating either large number.
The exponent GCD is twelve, so the expression equals . The exponent identity is the reason reducing the problem this way is valid; simply taking the GCD of exponents inside an arbitrary expression would not be justified.
A smaller algebraic GCD often controls how prime powers can split across factors. For instance,
Thus the two factors of are coprime when is even and share only a factor of two when is odd. This is often the decisive observation in perfect-power equations.
Divisors with Additional Restrictions
Section titled “Divisors with Additional Restrictions”The divisor-count formula comes from choosing prime exponents independently. Additional conditions simply alter the allowed exponent choices.
If , the number of square divisors is , since only even exponents are permitted. More generally, perfect th-power divisors use exponents . For divisors divisible by with , the available exponent range is , giving .
Example. Find the number of positive divisors of that are squares, and the number divisible by twelve.
Use . A square divisor chooses the exponent of two from , of three from , and of five only as zero. There are four square divisors.
For a divisor divisible by , the exponents have respectively two, two, and two choices. Hence there are eight such divisors.
For coprime factor pairs , every prime power of must go entirely into one factor or the other. If has distinct prime divisors, there are ordered coprime factorizations. Allowing a prime power to split between the two factors would violate coprimality.
Least Common Multiples of Long Lists
Section titled “Least Common Multiples of Long Lists”To make an integer divisible by every number in a list, retain the largest required exponent of each prime. In particular,
where is the largest power of not exceeding . This is different from , which contains many repeated factors that are unnecessary for the divisibility requirement.
If a power of an unknown number must satisfy the divisibility, divide the required exponents by that power and round up.
Example. Find the smallest positive integer such that is divisible by every integer from one through twelve.
The required least common multiple is . Therefore needs prime exponents at least . The smallest possibility is
Each required exponent is forced, so omitting any factor would fail. Adding any other prime would only increase the number.
This “required exponent, then round up” method also handles a smallest multiplier making a number a cube or a smallest denominator clearing several rational expressions.
The Smallest Number with a Given Divisor Count
Section titled “The Smallest Number with a Given Divisor Count”Suppose has exactly positive divisors. Its exponents satisfy . To minimize , use the smallest available primes and place the largest exponents on the smallest primes.
The ordering follows from an exchange: if and , then . Thus a minimizing factorization has nonincreasing exponents attached to increasing primes.
Example. Find the smallest positive integer with exactly twenty-four divisors.
List the unordered factorizations of twenty-four into integers greater than one. They give exponent patterns
Using the smallest primes in decreasing exponent order gives, respectively,
The smallest is . Its divisor count is . The complete factorization list and exchange argument prove that a smaller integer cannot work.
The divisor-count equation is multiplicative, so treating twenty-four as a sum of exponent contributions would be incorrect. Each new prime adds a new factor to the divisor count.
Divisor Sums and Perfect Numbers
Section titled “Divisor Sums and Perfect Numbers”A positive integer is perfect when the sum of its proper positive divisors equals the number itself. Equivalently, . The divisor-sum formula lets us verify such conditions without listing every divisor.
If is prime, then
is perfect. The two displayed factors are coprime, so their divisor sums multiply:
For this gives twenty-eight, and for it gives four hundred ninety-six. The prime condition matters; a composite second factor has additional divisors and changes the sum.
This is a construction of perfect numbers, not a proof that every number of the displayed shape works. A formula containing a primality hypothesis must keep that hypothesis when used in examples.
Factorials, Coprimality, and New Prime Divisors
Section titled “Factorials, Coprimality, and New Prime Divisors”For , no prime at most divides , because it divides and cannot also divide the difference one. Therefore every prime divisor of exceeds . This proves there are arbitrarily large primes, but does not prove itself is prime.
Example. Prove that and are coprime for every positive integer .
Subtract times the first expression from the second. Their common divisors must divide , so
Since divides , any common divisor of and divides one. The GCD is therefore one.
The proof combines algebraic subtraction with a simple divisibility fact. This is often more effective than trying to factor expressions involving factorials.
Coprimality of a Sum and a Product
Section titled “Coprimality of a Sum and a Product”If positive integers are coprime, then is coprime to . A prime dividing both would divide one of and then, from the sum, the other, contradicting coprimality.
This lets us cancel an entire product in a divisibility condition even when the numbers themselves are unknown.
Example. Coprime positive integers satisfy . Find all possible pairs.
Subtract the divisible expression to obtain . Since , the sum divides two. Positivity gives , so the sum is exactly two and .
The pair satisfies both the coprimality and divisibility requirements. Without coprimality, many scaled examples would remain, so that hypothesis is doing essential work.
Fibonacci GCDs by the Euclidean Algorithm
Section titled “Fibonacci GCDs by the Euclidean Algorithm”The Fibonacci numbers satisfy
The proof combines two simple recurrence facts. First, consecutive Fibonacci numbers are coprime, since applying the recurrence repeatedly reduces their GCD to .
Second, the addition identity
follows by induction on . Reducing it modulo and using the coprimality of gives
Thus the Euclidean algorithm on the indices is mirrored by a Euclidean algorithm on the Fibonacci values. The endpoint with equal indices or a zero index supplies the claimed formula.
For example, . The two original Fibonacci numbers can be very large, but their common divisor is controlled by the much smaller index calculation.
This is a useful general contest habit: when a sequence has an addition identity, check whether it reduces a GCD just as exponent subtraction did for . The recurrence may provide a divisibility structure that is invisible from the first few numerical terms.
Reconstructing Numbers from Their GCD and LCM
Section titled “Reconstructing Numbers from Their GCD and LCM”If positive integers have GCD , write them as with . Their LCM is then . Thus prescribing LCM reduces the problem to coprime factor pairs .
This requires . When it holds, each full prime power of must be assigned entirely to one of . The condition is stronger than simply asking for any factor pair.
Example. Positive integers have GCD twelve and LCM four hundred twenty. Find the smallest possible value of .
Write . Then and are coprime. Up to order, the possibilities are and . Their corresponding sums are and .
The minimum is therefore 144, attained by sixty and eighty-four. Checking gives GCD twelve and LCM four hundred twenty, so the candidate meets both requirements.
A fixed product generally favors factors near its square root when minimizing a sum, but the coprimality condition restricts which near factors are admissible. Listing the coprime factor pairs supplies the necessary completeness argument instead of relying only on a continuous AM–GM bound.