Primes, HCF and LCM

Chapter 1 Study Notes

Start Practice →

1.2 Trial Division

To test whether nn is prime you do not have to try every number below it. Test only the PRIMES up to n\sqrt{n}. If n=a×bn = a \times b then one of aa and bb is at most n\sqrt{n}, so if nothing that small divides nn, nothing larger will either.

  1. Work out n\sqrt{n}.
  2. Divide nn by each prime up to n\sqrt{n}: 2,3,5,7,11,2, 3, 5, 7, 11, \ldots
  3. One divides exactly, so nn is composite. None does, so nn is prime.

Testing large numbers for primality

For each number below, state whether it is prime or composite, and give your reasoning: (a) 861 (b) 509

  1. (a) Digit sum of 861861: 8+6+1=158 + 6 + 1 = 15, divisible by 33.
  2. 861\therefore 861 is composite (861=3×287861 = 3 \times 287).
  3. (b) 509=22.6\sqrt{509} = 22.6 (to 1 d.p.), so test all primes 22\leq 22: 2,3,5,7,11,13,17,192, 3, 5, 7, 11, 13, 17, 19.
  4. 509509 is odd (not div. by 2), digit sum =14= 14 (not div. by 3), does not end in 0 or 5, and 509÷7=72.7509 \div 7 = 72.7\ldots, 509÷11=46.2509 \div 11 = 46.2\ldots, 509÷13=39.1509 \div 13 = 39.1\ldots, 509÷17=29.9509 \div 17 = 29.9\ldots, 509÷19=26.7509 \div 19 = 26.7\ldots
  5. 509\therefore 509 is prime.

Try it

A practice question on this appears here. Practise primes hcf lcm.

Predict

Is 9191 prime? It is odd, its digits add to 1010, and it does not end in 00 or 55, so it passes the tests for 22, 33 and 55.

91=9.5\sqrt{91} = 9.5 (to 1 d.p.), so 77 is still on the list of primes to test.

91=7×1391 = 7 \times 13, so 9191 is composite.

Stopping at 22, 33 and 55 is the usual reason a composite number gets called prime.

Practise this

Questions on Primes, HCF and LCM, marked as you go, with the working shown.

Practise Primes, HCF and LCM