Second year
Home Up


Number Theory
(a second year BA/BEd only course, using Maple)

The legendary German mathematician Carl Friedrich Gauss (1777-1855) called Mathematics the ‘Queen of the Sciences’, and Number Theory the ‘Queen of Mathematics.’ Gauss wrote in his seminal Disquisitiones Arithmeticae (1801): ‘Far more is owed to modern authors, of whom very few men of immortal glory P. de Fermat, L. Euler, L. Lagrange, A. M. Legendre (and a few others) opened the entrance to the shrine of this divine science and revealed the abundant wealth within it.’ 

Harold Davenport, the renowned English mathematician, wrote: ‘A peculiarity of Number Theory is the great difficulty which has been experienced in proving simple general theorems which have been suggested quite naturally by numerical evidence. “It is just this,” said Gauss, “which gives Number Theory that magical charm which has made it the favourite science of the greatest mathematicians, not to mention its inexhaustible wealth, wherein it so greatly surpasses other parts of mathematics.” ’ 

Davenport further wrote of Number Theory: ‘It certainly has very few direct applications to other sciences, but it has one feature in common with them, namely the inspiration which it derives from experiment, which takes the form of testing possible general theorems by numerical examples. Such experiment, though necessary in some form to progress in every part of mathematics, has played a greater part in the development of the theory of Number Theory than elsewhere; for in other branches of mathematics the evidence found in this way is too often fragmentary and misleading.’ 

Incidentally, Davenport did not foresee (indeed could not, given the time at which he lived) the extraordinary impact that Number Theory would have in terms of security applications; see my linked third year course on Number Theory and Cryptography.

Aims/Objectives. This course aims to introduce the student to some core topics in Number Theory, specifically:  

  1. Congruences 

  2. The Euclidean Algorithm and the extended Euclidean Algorithm (and its fundamental applications: e.g. the fundamental property of primes in the system of natural numbers) 

  3. Fermat's 'little' theorem (surely the fundamental result in elementary Number Theory), together with some important explorations (is the converse of Fermat's little theorem true?) and applications 

together with a number of other topics (some Diophantine equations, rational approximations to quadratic irrationalities, unique factorisation and applications, abundant, deficient and perfect numbers, Sierpinski numbers, Fermat numbers, ...) which I change from year to year. 

Students taking this course will have already acquired a facility in the use of Maple (the Computer Algebra System) in their first year of studies, and will continue to add to their expertise in this course. 

Learning outcomes . At the end of this course, a student who has worked honestly on the course material (ideally who has engaged with the course content) should have a sound knowledge of some important, fundamental ideas in this core mathematical discipline.

I have begun the process (which will take some time to complete) of converting my Word doc notes to pdf format only.

An Introduction to Prime Numbers (pdf)

Congruences (pdf)  

Euclidean Algorithm (pdf)  

Extended Eucl Alg (zip) Extended Eucl Alg (rtf, zip) 

Fermat's little theorem (pdf)

(For my real labour-of-love work on Fermat's little theorem, interested readers should consult the specially created Fermat's little theorem section of my web site.)

There are related Maple worksheets in this corner of my web site.

I will add more material here at some future time.

Contact details. jbcosgrave at