PYQ Vault

SPI Mathematics · Number System

Divisibility, Primes and Factorisation

Divisibility rules tell you quickly what divides a number, a prime has no factors but 1 and itself, and every whole number above 1 is one fixed product of primes.

Why this matters

Eleven questions in the bank, ten EASY and one MODERATE, and one is from the 2022 paper. Most ask you to split a number into primes and read off the powers; the rest test a divisibility rule or whether a number is prime.

Concept 1 of 3: Divisibility rules

You do not need to divide to know whether a number divides exactly. Each small divisor leaves a sign in the digits: the last digit, the last few digits, or the sum of the digits.

Definition

  • To count the multiples of kk in a range, list the first and the last multiple and count in steps of kk.
  • 'Between 11 and 50' leaves out 11 and 50 themselves.
  • To count numbers divisible by aa but not by bb, count the multiples of aa and take away the multiples of the LCM of aa and bb.
DivisorRuleExample
2Last digit is 0, 2, 4, 6 or 83576
3Sum of the digits is divisible by 3741: 7+4+1=127 + 4 + 1 = 12
4Last two digits form a number divisible by 45316: 16
5Last digit is 0 or 58935
6Divisible by both 2 and 3912: even, 9+1+2=129 + 1 + 2 = 12
8Last three digits form a number divisible by 871240: 240
9Sum of the digits is divisible by 96534: 6+5+3+4=186 + 5 + 3 + 4 = 18
11Alternating sum of the digits is 0 or a multiple of 113729: 3−7+2−9=−113 - 7 + 2 - 9 = -11
Add and subtract the digits in turn. The plain digit sum says nothing about 11.
Each example in the last column passes its rule.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

SPI · 2022 · SPI Entrance Examination 2022 · Q65Easy

Example 1 · Number System · Divisibility, Primes and Factorisation

How many numbers between 11 and 50 are there which are exactly divisible by 7 but not exactly divisible by 3?

Taking away multiples of the product, not the LCM

Up to 50 there are 12 multiples of 4. Those that are also multiples of 6 are the multiples of 12 (12, 24, 36, 48), so 8 are divisible by 4 but not by 6. Taking away only the multiples of 24 gives 10, which is wrong.

Testing 6 with one rule

A number divisible by 3 is not always divisible by 6. It must also be even: 75 passes the rule for 3 but is odd.

Concept 2 of 3: Prime and composite numbers

A prime has exactly two factors, 1 and itself. To test a number, you only need to try the primes up to its square root: if a bigger factor existed, a smaller partner would already have shown up.

Definition

  • A prime has exactly two factors. A composite number has more than two.
  • 1 is neither prime nor composite.
  • 2 is the only even prime, so every other prime is odd.
  • The smallest composite number is 4 and the smallest odd composite number is 9.
  • To test nn, divide by the primes 2, 3, 5, 7, 11, 13, ... up to n\sqrt{n}. If none divides, nn is prime.

Worked example

Is 211 a prime number?
Practice this conceptself-check · 4 quick reps

The same idea in a practice question:

Practice questionModerate

Example 2 · Number System · Divisibility, Primes and Factorisation

Which of the following numbers is a prime number?

Calling 1 a prime

1 has only one factor, so it is neither prime nor composite. The smallest prime is 2.

Numbers that look prime

91 (7×137 \times 13), 119 (7×177 \times 17) and 143 (11×1311 \times 13) are odd and pass the rules for 3 and 5, yet they are composite. Test the primes up to the square root before deciding.

Concept 3 of 3: Prime factorisation

Keep splitting a number until every piece is a prime. However you start, you always end with the same primes: this is the Fundamental Theorem of Arithmetic. The powers of those primes answer most questions.

Definition

  • Divide by 2 as long as you can, then by 3, then 5, 7, 11, and so on.
  • Fundamental Theorem of Arithmetic: every whole number above 1 is a product of primes in exactly one way, apart from order.
  • If a prime pp divides b2b^2, then pp divides bb.
  • Each zero at the end of a number needs one 2 and one 5 (2×5=102 \times 5 = 10), so the number of end zeros is the smaller of the powers of 2 and 5.

Prime factorisation and end zeros

n=p1a1×p2a2×⋯×pkakzeros at the end of 2a×5b×…=the smaller of a,bn = p_1^{a_1} \times p_2^{a_2} \times \cdots \times p_k^{a_k} \qquad \text{zeros at the end of } 2^a \times 5^b \times \ldots = \text{the smaller of } a, b
  • p₁, p₂, ..., pₖthe different primes that divide n
  • a₁, a₂, ..., aₖhow many times each prime appears

Worked example

Write 1540 as a product of primes.
Practice this conceptself-check · 4 quick reps

The same idea in a practice question:

Practice questionEasy

Example 3 · Number System · Divisibility, Primes and Factorisation

If the prime factorisation of 2520 is 23×3a×b×72^3 \times 3^a \times b \times 7, then the value of a + 2b is:

Stopping at a composite piece

22×9×52^2 \times 9 \times 5 is not finished, because 9 is 323^2. Every factor in the final answer must be a prime.

Adding the powers of 2 and 5 for end zeros

23×542^3 \times 5^4 ends in 3 zeros, not 7. Each zero uses one 2 and one 5 together, so the smaller power decides.

Squaring the divisor

If a prime p divides b2b^2, then p divides b, but p2p^2 need not divide b: 3 divides 323^2, yet 9 does not divide 3.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (1)

  • Prime factorisation

    Prime factorisation and end zeros

    n=p1a1×p2a2×⋯×pkakzeros at the end of 2a×5b×…=the smaller of a,bn = p_1^{a_1} \times p_2^{a_2} \times \cdots \times p_k^{a_k} \qquad \text{zeros at the end of } 2^a \times 5^b \times \ldots = \text{the smaller of } a, b

Reference tables (1)

Divisibility rules8 rows
DivisorRuleExample
2Last digit is 0, 2, 4, 6 or 83576
3Sum of the digits is divisible by 3741: 7+4+1=127 + 4 + 1 = 12
4Last two digits form a number divisible by 45316: 16
5Last digit is 0 or 58935
6Divisible by both 2 and 3912: even, 9+1+2=129 + 1 + 2 = 12
8Last three digits form a number divisible by 871240: 240
9Sum of the digits is divisible by 96534: 6+5+3+4=186 + 5 + 3 + 4 = 18
11Alternating sum of the digits is 0 or a multiple of 113729: 3−7+2−9=−113 - 7 + 2 - 9 = -11
Add and subtract the digits in turn. The plain digit sum says nothing about 11.
Each example in the last column passes its rule.

Watch out for (7)

Test yourself on a real paper

Sit a past SPI paper, timed and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.