Lesson 17 of 46 · Arithmetic

Integers, divisibility and primes

Break any integer into primes, then use the factorisation to count divisors, find the GCD and LCM, and decide what must divide a number.

About 20 minutes

In this lesson

  • Test divisibility by 2, 3, 4, 5, 6, 8, 9 and 10 without dividing.
  • Write the prime factorisation of an integer and use it to count its positive divisors.
  • Find the greatest common divisor and least common multiple of two integers from their factorisations.
  • Decide what must, and what need not, divide an integer described only by its divisors.

The idea

Factors, multiples and divisibility

An integer dd divides nn when n=dkn = dk for some integer kk. Then dd is a factor (or divisor) of nn, and nn is a multiple of dd. The words describe one relationship from two sides: 6 is a factor of 42, and 42 is a multiple of 6.

Two edge cases are worth fixing in memory. Every integer divides 0, because 0=d×00 = d \times 0. And 1 divides everything, while every non-zero integer divides itself. Questions about factors usually mean positive factors, but read the stem: negative integers are factors too, since 42=(−6)(−7)42 = (-6)(-7).

Divisibility rules worth knowing

Divisor Test
2 last digit even
3 sum of digits divisible by 3
4 last two digits form a multiple of 4
5 last digit 0 or 5
6 divisible by both 2 and 3
8 last three digits form a multiple of 8
9 sum of digits divisible by 9
10 last digit 0

The rules for 3 and 9 work because 10≡110 \equiv 1 when you divide by 3 or 9: every power of 10 leaves remainder 1, so a number leaves the same remainder as the sum of its digits. For example, 7,128 has digit sum 18, so it is divisible by 9 (and by 3); its last two digits, 28, make it divisible by 4.

Primes and prime factorisation

A prime is an integer greater than 1 whose only positive divisors are 1 and itself: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, … Two facts trip people up. 1 is not prime, and 2 is the only even prime.

Every integer greater than 1 can be written as a product of primes in exactly one way, apart from order. Build the factorisation with a factor tree, splitting off small primes first:

360=36×10=(22×32)(2×5)=23×32×5360 = 36 \times 10 = (2^2 \times 3^2)(2 \times 5) = 2^3 \times 3^2 \times 5

To check whether a number is prime, you only need to try primes up to its square root. For 151, 151\sqrt{151} is a little above 12, so you try 2, 3, 5, 7 and 11; none divides 151, so 151 is prime.

Reading the factorisation

The factorisation is a complete description of the number, and most integer questions are answered by reading it.

Divisors. A positive divisor of 23×32×52^3 \times 3^2 \times 5 chooses an exponent for each prime: 0 to 3 for the 2, 0 to 2 for the 3, 0 to 1 for the 5. That gives (3+1)(2+1)(1+1)=24(3+1)(2+1)(1+1) = 24 divisors. In general, if n=paqbrcn = p^a q^b r^c, then nn has (a+1)(b+1)(c+1)(a+1)(b+1)(c+1) positive divisors. The "+1" counts the choice of leaving that prime out.

Divides. dd divides nn exactly when every prime in dd appears in nn at least as many times. So 12=22×312 = 2^2 \times 3 divides 360, but 27=3327 = 3^3 does not, because 360 has only two 3s.

Perfect squares and cubes. A perfect square has every exponent even; a perfect cube has every exponent a multiple of 3.

Greatest common divisor and least common multiple

Line the two factorisations up prime by prime.

  • The GCD takes each shared prime with the smaller exponent.
  • The LCM takes every prime that appears in either number, with the larger exponent.

For two positive integers, gcd⁡(a,b)×lcm⁡(a,b)=a×b\gcd(a, b) \times \operatorname{lcm}(a, b) = a \times b, which gives a quick check on your work.

The LCM answers a whole family of questions: if nn is divisible by both aa and bb, then nn is divisible by lcm⁡(a,b)\operatorname{lcm}(a, b), and by nothing larger that you can be sure of. Divisible by 4 and by 6 guarantees divisibility by 12, not by 24, because 4 and 6 share a factor of 2 that the product counts twice.

Testing "must be" claims

Many integer questions ask what must be true. Prove a "must" with the factorisation; disprove it with one counterexample, usually the smallest number that fits the facts. For "divisible by 4 and 6", try n=12n = 12: anything that fails for 12 is not a "must".

Worked examples

Example 1: How many divisors?

How many positive divisors does 360 have?

  1. Factorise: 360=8×45=23×32×5360 = 8 \times 45 = 2^3 \times 3^2 \times 5.

  2. Each divisor picks an exponent for every prime: 4 choices for the 2 (0 to 3), 3 for the 3 (0 to 2) and 2 for the 5 (0 or 1).

  3. Multiply the numbers of choices: 4×3×2=244 \times 3 \times 2 = 24.

  4. Check by pairing: the divisors pair up as 1×3601 \times 360, 2×1802 \times 180, 3×1203 \times 120, 4×904 \times 90, 5×725 \times 72, 6×606 \times 60, 8×458 \times 45, 9×409 \times 40, 10×3610 \times 36, 12×3012 \times 30, 15×2415 \times 24, 18×2018 \times 20. That is 12 pairs, so 24 divisors.

Answer

360 has 24 positive divisors. Multiplying the exponents themselves (3×2×1=63 \times 2 \times 1 = 6) is the tempting slip; it forgets that each prime can also be left out.

Example 2: GCD and LCM side by side

Find the greatest common divisor and the least common multiple of 84 and 120.

  1. Factorise both: 84=22×3×784 = 2^2 \times 3 \times 7 and 120=23×3×5120 = 2^3 \times 3 \times 5.

  2. GCD: shared primes with the smaller exponent. The shared primes are 2 and 3, so the GCD is 22×3=122^2 \times 3 = 12.

  3. LCM: every prime with the larger exponent: 23×3×5×7=8402^3 \times 3 \times 5 \times 7 = 840.

  4. Check with the product rule: 12×840=10 08012 \times 840 = 10\,080 and 84×120=10 08084 \times 120 = 10\,080.

Answer

The GCD is 12 and the LCM is 840. The product 84×120=10 08084 \times 120 = 10\,080 is a common multiple, but not the least one.

Example 3: Making a perfect square

What is the smallest positive integer kk for which 150k150k is a perfect square?

  1. Factorise: 150=2×3×52150 = 2 \times 3 \times 5^2.

  2. A perfect square needs every exponent even. The 5 already has exponent 2; the 2 and the 3 each have exponent 1, so each needs one more copy.

  3. The smallest kk supplies exactly those copies: k=2×3=6k = 2 \times 3 = 6.

  4. Check: 150×6=900=302150 \times 6 = 900 = 30^2.

Answer

k=6k = 6. Choosing k=150k = 150 also makes a perfect square (1502150^2), but it is not the smallest.

Common traps

  • Counting 1 as a prime

    1 has only one positive divisor, so it is not prime (and not composite either). A question asking for "the number of primes less than 20" wants 2, 3, 5, 7, 11, 13, 17, 19: eight, not nine. Equally, do not forget 2, the only even prime.

  • Multiplying two divisors to get a guaranteed divisor

    If nn is divisible by 4 and by 6, it need not be divisible by 24: n=12n = 12 is a counterexample. Only the LCM is guaranteed. The product works only when the two numbers share no prime factor, as with 4 and 9.

  • Multiplying exponents instead of exponents plus one

    For n=23×32×5n = 2^3 \times 3^2 \times 5, the divisor count is (3+1)(2+1)(1+1)=24(3+1)(2+1)(1+1) = 24, not 3×2×1=63 \times 2 \times 1 = 6. The exponent 0 is a real choice: it is how you get divisors such as 1, 3 and 9 that leave out the 2.

  • Proving a "must" with one example

    One number that works shows a statement can be true, not that it must be. Use examples to break claims and the factorisation to prove them. If the stem fixes nothing but divisibility, start with the smallest number that fits, usually the LCM.

Check yourself

Answer each question before you open its answer.

Question 1: Divisors of 540

Integer properties

How many positive divisors does 540 have?

  1. A.6
  2. B.9
  3. C.12
  4. D.16
  5. E.24
Show the answer

Answer: E. 24

Working

540=4×135=22×33×5540 = 4 \times 135 = 2^2 \times 3^3 \times 5. The number of positive divisors is (2+1)(3+1)(1+1)=3×4×2=24(2+1)(3+1)(1+1) = 3 \times 4 \times 2 = 24. Check: there are 8 odd divisors (4×24 \times 2, the divisors of 135) and 16 even ones, and 8+16=248 + 16 = 24.

Why the other options are wrong

  • A. This multiplies the exponents of 540=22×33×5540 = 2^2 \times 3^3 \times 5 without adding 1 to each, so it never lets a prime be left out.
  • B. This adds the counts 3+4+23 + 4 + 2 instead of multiplying them; each divisor makes one choice for every prime at once.
  • C. This is the number of divisor pairs, such as 1×5401 \times 540 and 2×2702 \times 270; each pair holds two divisors.
  • D. This counts only the even divisors, those that use the 2 at least once: 2×4×22 \times 4 \times 2.

What carries over

Factorise, add 1 to each exponent, and multiply.

Question 2: A multiple of 4 and 6

Quantitative Comparison

nn is a positive integer that is a multiple of both 4 and 6.

Quantity A Quantity B
nn 24
  1. A.Quantity A is greater.
  2. B.Quantity B is greater.
  3. C.The two quantities are equal.
  4. D.The relationship cannot be determined from the information given.
Show the answer

Answer: D. The relationship cannot be determined from the information given.

Working

4=224 = 2^2 and 6=2×36 = 2 \times 3, so lcm⁡(4,6)=22×3=12\operatorname{lcm}(4, 6) = 2^2 \times 3 = 12, and nn can be any positive multiple of 12. With n=12n = 12, Quantity B is greater; with n=24n = 24 they are equal; with n=36n = 36, Quantity A is greater. Different allowed values give different results.

Why the other options are wrong

  • A. True for n=36n = 36 or n=48n = 48, but n=12n = 12 is a multiple of both 4 and 6 and is less than 24.
  • B. True only for n=12n = 12, the least common multiple; larger multiples of 12, such as 36, are also allowed.
  • C. This takes nn to be the product 4×64 \times 6. The product is one common multiple, but not the only one, and not the least.

What carries over

Divisible by two numbers means divisible by their LCM; list a few multiples of the LCM before you compare.

Question 3: What must divide n?

Integer properties

If nn is a positive integer divisible by both 6 and 8, which of the following must also divide nn?

  1. A.16
  2. B.18
  3. C.24
  4. D.36
  5. E.48
Show the answer

Answer: C. 24

Working

6=2×36 = 2 \times 3 and 8=238 = 2^3, so lcm⁡(6,8)=23×3=24\operatorname{lcm}(6, 8) = 2^3 \times 3 = 24. Any nn divisible by 6 and 8 is a multiple of 24, so 24 must divide nn. Every other choice fails for n=24n = 24 itself.

Why the other options are wrong

  • A. n=24n = 24 is divisible by 6 and 8 but not by 16; nn is only guaranteed three factors of 2, not four.
  • B. n=24n = 24 fits the facts and is not divisible by 18; nn is only guaranteed one factor of 3, not two.
  • D. 36=6×636 = 6 \times 6 needs two factors of 3, and n=24n = 24 has only one.
  • E. This is the product 6×86 \times 8. It counts the shared factor 2 twice, and n=24n = 24 fits the facts without being divisible by 48.

What carries over

The smallest number that fits the facts, the LCM, is the counterexample that rules out every larger "must".

Key points

  • Prime factorisation answers most integer questions: divisors, GCD, LCM, squares and cubes.

  • If n=paqbn = p^a q^b, it has (a+1)(b+1)(a+1)(b+1) positive divisors.

  • GCD takes the smaller exponent of shared primes; LCM takes the larger exponent of every prime.

  • Divisible by aa and bb guarantees only divisibility by their LCM.

  • 1 is not prime; 2 is the only even prime.

All questions here are original and written for UniExamer; none comes from the test maker.

Written by the UniExamer team with AI assistance. Every worked example and check question was re-solved by an independent checker before publication. No subject expert has reviewed this lesson yet. If you find a mistake, write to support@uniexamer.com.

Esercitati su questo argomento

Domande nuove su questa abilità, con spiegazioni svolte. L’esercitazione richiede un Single Exam Pass o Plus.