Advanced Higher Maths
Number Theory

 For textbooks and tutoring, we recommend: 

Page sections

Topic content

  • Using Euclid's algorithm to find the greatest common divisor of two positive integers
  • Expressing the greatest common divisor of two positive integers as a linear combination of the two
  • Converting integers between bases
  • Knowing and using the fundamental theorem of arithmetic (unique factorisation theorem).

Textbook page numbers

  • Zeta AH Maths Textbook pp.124-134
  • Leckie AH Maths Textbook pp.324-342
  • Leckie Practice Book pp.80-83

Buy our favourite textbook

Zeta: Advanced Higher
Clear and comprehensive.
Progressive exercises.
Includes answers.
Buy from Zeta Press 

Need a tutor for AH Maths?

Try our free, no-obligation tutor search tool.
Click here to find a tutor in your area. 

×

Example 1 (non-calculator)

Subtopic: Greatest common divisor

Use the Euclidean algorithm to find the greatest common divisor of \(98\) and \(35\small.\)

Example 2 (calculator)

Subtopic: Greatest common divisor

Use Euclid's algorithm to find the highest common factor of \(714\) and \(221\small.\)

Example 3 (calculator)

Subtopic: Linear combinations

Find integers \(a\) and \(b\) such that \(319a+132b=11\small.\)

Recommended textbook

Zeta Maths: Advanced Higher Maths 
 Best price, direct from Zeta Press

Example 4 (calculator)

Subtopics: GCD, Linear combinations

Show that the greatest common divisor of \(133\) and \(612\) is \(1\small.\)
Hence find \(x\small,\,\normalsize y\in\mathbb Z\) such that \(133x+612y=1\small.\)

Example 5 (calculator)

Subtopic: Number bases

Convert \(3508\) into base \(7\small.\)

Example 6 (calculator)

Subtopic: Number bases

Convert \(7054_{9}\) into base \(8\small.\)

Example 7 (calculator)

SQA Advanced Higher Maths 2023 Paper 2 Q6
Subtopics: GCD, Linear combinations

(a)  Use the Euclidean algorithm to find \(d\small,\) the greatest common divisor of \(703\) and \(399\small.\)
(b)  Find integers \(a\) and \(b\) such that \(d=703a+399b\small.\)
(c)  Hence find integers \(p\) and \(q\) such that \(76=703p+399q\small.\)

Example 8 (calculator)

SQA Advanced Higher Maths 2023 Paper 2 Q9
Subtopic: Number bases

Express \(572_{10}\) in base \(9\small.\)

Example 9 (calculator)

SQA Advanced Higher Maths 2024 Paper 2 Q2
Subtopic: Linear combinations

Use the Euclidean algorithm to find integers \(a\) and \(b\) such that \(533a+455b=13\small.\)

Example 10 (calculator)

SQA Advanced Higher Maths 2025 Paper 2 Q4
Subtopics: GCD, Linear combinations

(a)  Use the Euclidean algorithm to find \(d\small,\) the greatest common divisor of \(1118\) and \(416\small.\)
(b)  Hence find integers \(a\) and \(b\) such that \(1118a+416b=d\small.\)

Buy AH Maths revision guides

How To Pass: Advanced Higher Maths 
BrightRED: AH Maths Study Guide 

Past paper questions

Euclidean algorithm:
2016 Specimen Paper Q4
2017 Paper Q8
2018 Paper Q5
2021 Paper 2 Q2
2022 Paper 2 Q3
2023 Paper 2 Q3
2024 Paper 2 Q2
2025 Paper 2 Q4
Number bases:
2019 Paper Q12
2023 Paper 2 Q9
Pre-2016 AH Maths specification:
PPQs from 2001 (with answers)

Buy our favourite textbook

Zeta: Advanced Higher
Clear and comprehensive.
Progressive exercises.
Includes answers.
Buy from Zeta Press 

Number theory worksheets

Armadale Academy worksheet
Number theory & proof (Solutions)
Dunblane High School worksheet
Number theory (with answers)
High School of Glasgow worksheet
Number theory (with answers)
Knox Academy worksheet
Euclidean algorithm (with answers)
Lanark Grammar worksheet
Number theory (with answers)

Buy AH Maths revision guides

How To Pass: Advanced Higher Maths 
BrightRED: AH Maths Study Guide 

Notes and videos

Notes – Auchmuty High School
Notes – Hyndland Secondary School
Notes – Madras College
Notes and examples – Maths Mutt
Notes and exercises
– St Andrew's Academy
Notes – St Machar Academy
Videos – St Andrew's Academy
Videos – Mr Thomas

⇦ AH topic list  ⇧ Top of this page