Arithmetic · Round I · Foundations · Primes and divisibility

Primes and Euclid's proof

I can reconstruct Euclid's proof that no finite list of primes is complete, say exactly what it claims and what it does not, and use a counterexample to test a claim about primes.

Not started

1 Learn

You will be able to

  • Classify a number as prime or composite by finding a divisor other than 1 and itself.
  • Write Euclid's proof that no finite list of primes is complete as numbered steps.
  • State what IX.20 claims in Euclid's wording and what the construction does not do.
  • Use one counterexample to refute a claim about all n, and say why successful cases do not prove it.
  1. LabInfinitely many primesEuclid's proof step by step, what IX.20 actually states, and the worked case 30031 = 59 x 509.
  2. LibraryProof and Precise Reasoning: From Arguments to Theorems · The main proof formsPlaces IX.20 among the proof forms and notes that Euclid's own version is constructive.2 min glance · 7 min
  3. LibraryProof and Precise Reasoning: From Arguments to Theorems · What a proof is, and is notWhy an example or a computation can refute a claim about all numbers but never establish one.2 min glance · 7 min
  4. LibraryProof and Precise Reasoning: From Arguments to Theorems · Counterexample and falsificationA single valid counterexample refutes a universal claim.2 min glance · 7 min
  5. LibraryThe Seven Liberal Arts, Hands-On: Logic, Proof and the Quadrivium · The quadrivium in practiceEuler's polynomial n squared plus n plus 41: forty prime values in a row, then 1681 = 41 squared.2 min glance · 7 min

2 Practise

Answer each card from memory, then grade yourself honestly. The cards join your review deck and come back on a spaced schedule that supports retention.

  1. recall

    In Euclid's proof (Elements IX.20) that no finite list of primes is complete, what number is formed from a list p₁, …, pₙ, and why must its prime divisor be missing from the list?

    Show answer

    N = (p₁ · p₂ · … · pₙ) + 1. N is greater than 1, so it has a prime divisor q. If q were on the list it would divide both the product and N, hence their difference, 1, which no prime divides.

  2. recall

    Euclid's Elements IX.20 is usually summarised as 'there are infinitely many primes'. What does it actually state?

    Show answer

    That the primes are more than any assigned multitude of primes, so no finite list of primes can be complete. Euclid avoids speaking of a completed infinity and claims only what the construction shows.

  3. apply

    Apply Euclid's prime construction to the primes 2, 3, 5, 7, 11 and 13. What is N, is it prime, and what does the result show about the method?

    Show answer

    N = 30030 + 1 = 30031 = 59 × 509, so it is composite. Its factors are new primes, as the proof promises, but neither is the next prime, 17. The construction proves new primes exist without finding them: existence is not a method.

  4. apply

    A student finds that a formula gives a prime for every whole number from 0 to 20 and is ready to claim it always does. What does the page advise, and what does its Euler example show?

    Show answer

    Passing cases is not proof: testing refutes quickly but cannot prove a claim about every n, so keep testing and seek a proof. Euler's n squared plus n plus 41 gives a prime for every n from 0 to 39, yet n = 40 gives 1681, which is 41 squared.

  5. apply

    A classmate checks a formula for n = 1, 2, 3 and 4 and concludes it holds for every positive integer n. Why is that not a proof, and which proof form on the page is built to cover every n?

    Show answer

    Checking particular cases can refute a universal claim but cannot establish it; the next case could fail, as "every odd number is prime" fails at 9. Induction can cover every n: prove a base case, then prove that if the formula holds for n, it holds for n + 1.

  6. connect

    This page says the counterexample habit underlies the testing habit in 'Hypotheses, Predictions and Tests'. What asymmetry drives that habit, and how does it shape the way you test an explanation?

    Show answer

    One valid counterexample refutes a universal claim, while checking some cases cannot prove it. So you ask "what would refute this?" and design tests whose result could show the explanation wrong, writing the prediction down before you look.

3 Prove it: the mastery check

5 questions drawn from a pool of 12. The pass mark is 80%. There is no time limit, and you can retake it with new questions; your best result counts.

4 Prove it: the performance task

Euclid's argument, rebuilt and tested

Without looking at the page, write Euclid's proof that no finite list of primes is complete as numbered steps in your own words. Then run the construction on three lists: 2, 3, 5; a list of four or more primes that you choose; and a list that you choose and expect to give a composite N. For each list, record the product, N, the prime factorisation of N, and which prime factors of N are missing from the list. Finish with two sentences: what the proof establishes, in Euclid's wording, and one thing the construction does not do.

What to hand in: One page, typed or handwritten and photographed: the numbered proof, a table with three rows (list, product, N, prime factorisation of N, missing primes) and the two closing sentences.

Check your work against the rubric

Saved only in this browser. To keep a copy, download it or export your progress.

5 Discuss: the seminar

Read the text, then think, write or talk through the question with someone. There is no answer key: the aim is a better question.

Arithmetic · Round 1

  • Nicomachus of Gerasa, Introduction to Arithmetic, translated by Martin Luther D'Ooge (Macmillan, 1926), Book I, chapters 7 to 13Chapter 7 divides number into even and odd. Chapters 8 to 10 divide the even. Chapters 11 to 13 divide the odd into the prime and incomposite, the secondary and composite, and the kind that is composite in itself but prime and incomposite relative to another. Chapter 13 also describes the sieve of Eratosthenes and a test by repeated subtraction for whether two odd numbers have a common measure. D'Ooge's translation was published in 1926, so it entered the public domain in the United States on 1 January 2022. This Zenodo record holds a full PDF scan of the 1926 volume. Cite by book and chapter, not by page.
    Read the passage here

    Nicomachus of Gerasa, Introduction to Arithmetic, trans. Martin Luther D'Ooge (Macmillan, 1926), public domain in the US since 2022; text taken from the OCR text layer of the page scan at https://zenodo.org/records/6060110 (pp. 201-207) with obvious OCR slips corrected and footnote markers removed

    I.11

    Again, while the odd is distinguished over against the even in classification and has nothing in common with it, since the latter is divisible into equal halves and the former is not thus divisible, nevertheless there are found three species of the odd, differing from one another, of which the first is called the prime and incomposite, that which is opposed to it the secondary and composite, and that which is midway between both of these and is viewed as a mean among extremes, namely, the variety which, in itself, is secondary and composite, but relatively is prime and incomposite.

    Now the first species, the prime and incomposite, is found whenever an odd number admits of no other factor save the one with the number itself as denominator, which is always unity; for example, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31. None of these numbers will by any chance be found to have a fractional part with a denominator different from the number itself, but only the one with this as denominator, and this part will be unity in each case; for 3 has only a third part, which has the same denominator as the number and is of course unity, 5 a fifth, 7 a seventh, and 11 only an eleventh part, and in all of them these parts are unity.

    It has received this name because it can be measured only by the number which is first and common to all, unity, and by no other; moreover, because it is produced by no other number combined with itself save unity alone; for 5 is 5 × 1, and 7 is 7 × 1, and the others in accordance with their own quantity. To be sure, when they are combined with themselves, other numbers might be produced, originating from them as from a fountain and a root, wherefore they are called 'prime,' because they exist beforehand as the beginnings of the others. For every origin is elementary and incomposite, into which everything is resolved and out of which everything is made, but the origin itself cannot be resolved into anything or constituted out of anything.

    I.13, the sieve

    The production of these numbers is called by Eratosthenes the 'sieve,' because we take the odd numbers mingled together and indiscriminate and out of them by this method of production separate, as by a kind of instrument or sieve, the prime and incomposite by themselves, and the secondary and composite by themselves, and find the mixed class by themselves.

    The method of the 'sieve' is as follows. I set forth all the odd numbers in order, beginning with 3, in as long a series as possible, and then starting with the first I observe what ones it can measure, and I find that it can measure the terms two places apart, as far as we care to proceed. And I find that it measures not as it chances and at random, but that it will measure the first one, that is, the one two places removed, by the quantity of the one that stands first in the series, that is, by its own quantity, for it measures it 3 times; and the one two places from this by the quantity of the second in order, for this it will measure 5 times; and again the one two places further on by the quantity of the third in order, or 7 times, and the one two places still farther on by the quantity of the fourth in order, or 9 times, and so ad infinitum in the same way.

    Then taking a fresh start I come to the second number and observe what it can measure, and find that it measures all the terms four places apart, the first by the quantity of the first in order, or 3 times; the second by that of the second, or 5 times; the third by that of the third, or 7 times; and in this order ad infinitum.

    […]

    Now these that are not measured at all, but avoid it, are primes and incomposites, sifted out as it were by a sieve; those measured by only one measure in accordance with its own quantity will have but one fractional part with denominator different from the number itself, in addition to the part with the same denominator; and those which are measured by one measure only, but in accordance with the quantity of some other number than the measure and not its own, or are measured by two measures at the same time, will have several fractional parts with other denominators besides the one with the same as the number itself; these will be secondary and composite.

    I.13, the test by subtraction

    We shall now investigate how we may have a method of discerning whether numbers are prime and incomposite, or secondary and composite, relatively to each other, since of the former unity is the common measure, but of the latter some other number also besides unity; and what this number is.

    Suppose there be given us two odd numbers and some one sets the problem and directs us to determine whether they are prime and incomposite relatively to each other or secondary and composite, and if they are secondary and composite what number is their common measure. We must compare the given numbers and subtract the smaller from the larger as many times as possible; then after this subtraction subtract in turn from the other, as many times as possible; for this changing about and subtraction from one and the other in turn will necessarily end either in unity or in some one and the same number, which will necessarily be odd. Now when the subtractions terminate in unity they show that the numbers are prime and incomposite relatively to each other; and when they end in some other number, odd in quantity and twice produced, then say that they are secondary and composite relatively to each other, and that their common measure is that very number which twice appears.

    For example, if the given numbers were 23 and 45, subtract 23 from 45, and 22 will be the remainder; subtracting this from 23, the remainder is 1, subtracting this from 22 as many times as possible you will end with unity. Hence they are prime and incomposite to one another, and unity, which is the remainder, is their common measure.

  • Euclid, Elements, Book VII (David Joyce's online edition, Clark University), Definitions 1 to 16; Propositions 1 and 2Definitions 11 to 14 define prime, relatively prime, composite and relatively composite numbers by what measures them. Propositions 1 and 2 are linked from the same page. Proposition 2 finds the greatest common measure of two numbers by repeated subtraction; Elements X.2 applies the same idea to magnitudes.
    Read the passage here

    Euclid, Elements, Book VII, trans. Sir Thomas L. Heath, The Thirteen Books of Euclid's Elements, 2nd ed. (Cambridge, 1925), public domain; text taken from the OCR of the Internet Archive scan (item euclid_heath_2nd_ed, vol. 2, pp. 276-280, 297-301) with obvious OCR slips and letters of the diagrams corrected. Used in place of David Joyce's edition, whose licence is not stated. Heath's wording differs from Joyce's (for example 'an unit', 'prime to one another').

    VII, Definitions 1-16

    1. An unit is that by virtue of which each of the things that exist is called one.

    2. A number is a multitude composed of units.

    3. A number is a part of a number, the less of the greater, when it measures the greater;

    4. but parts when it does not measure it.

    5. The greater number is a multiple of the less when it is measured by the less.

    6. An even number is that which is divisible into two equal parts.

    7. An odd number is that which is not divisible into two equal parts, or that which differs by an unit from an even number.

    8. An even-times even number is that which is measured by an even number according to an even number.

    9. An even-times odd number is that which is measured by an even number according to an odd number.

    10. An odd-times odd number is that which is measured by an odd number according to an odd number.

    11. A prime number is that which is measured by an unit alone.

    12. Numbers prime to one another are those which are measured by an unit alone as a common measure.

    13. A composite number is that which is measured by some number.

    14. Numbers composite to one another are those which are measured by some number as a common measure.

    15. A number is said to multiply a number when that which is multiplied is added to itself as many times as there are units in the other, and thus some number is produced.

    16. And, when two numbers having multiplied one another make some number, the number so produced is called plane, and its sides are the numbers which have multiplied one another.

    VII.1

    Two unequal numbers being set out, and the less being continually subtracted in turn from the greater, if the number which is left never measures the one before it until an unit is left, the original numbers will be prime to one another.

    For, the less of two unequal numbers AB, CD being continually subtracted from the greater, let the number which is left never measure the one before it until an unit is left;

    I say that AB, CD are prime to one another, that is, that an unit alone measures AB, CD.

    For, if AB, CD are not prime to one another, some number will measure them.

    Let a number measure them, and let it be E; let CD, measuring BF, leave FA less than itself,

    let AF, measuring DG, leave GC less than itself,

    and let GC, measuring FH, leave an unit HA.

    Since, then, E measures CD, and CD measures BF, therefore E also measures BF.

    But it also measures the whole BA; therefore it will also measure the remainder AF.

    But AF measures DG; therefore E also measures DG.

    But it also measures the whole DC; therefore it will also measure the remainder CG.

    But CG measures FH; therefore E also measures FH.

    But it also measures the whole FA; therefore it will also measure the remainder, the unit AH, though it is a number: which is impossible.

    Therefore no number will measure the numbers AB, CD; therefore AB, CD are prime to one another. [VII. Def. 12]

    Q. E. D.

    VII.2

    Given two numbers not prime to one another, to find their greatest common measure.

    Let AB, CD be the two given numbers not prime to one another.

    Thus it is required to find the greatest common measure of AB, CD.

    If now CD measures AB — and it also measures itself — CD is a common measure of CD, AB.

    And it is manifest that it is also the greatest; for no greater number than CD will measure CD.

    But, if CD does not measure AB, then, the less of the numbers AB, CD being continually subtracted from the greater, some number will be left which will measure the one before it.

    For an unit will not be left; otherwise AB, CD will be prime to one another [VII. 1], which is contrary to the hypothesis.

    Therefore some number will be left which will measure the one before it.

    Now let CD, measuring BE, leave EA less than itself,

    let EA, measuring DF, leave FC less than itself,

    and let CF measure AE.

    Since then, CF measures AE, and AE measures DF, therefore CF will also measure DF.

    But it also measures itself; therefore it will also measure the whole CD.

    But CD measures BE; therefore CF also measures BE.

    But it also measures EA; therefore it will also measure the whole BA.

    But it also measures CD; therefore CF measures AB, CD.

    Therefore CF is a common measure of AB, CD.

    I say next that it is also the greatest.

    For, if CF is not the greatest common measure of AB, CD, some number which is greater than CF will measure the numbers AB, CD.

    Let such a number measure them, and let it be G.

    Now, since G measures CD, while CD measures BE, G also measures BE.

    But it also measures the whole BA; therefore it will also measure the remainder AE.

    But AE measures DF; therefore G will also measure DF.

    But it also measures the whole DC; therefore it will also measure the remainder CF, that is, the greater will measure the less: which is impossible.

    Therefore no number which is greater than CF will measure the numbers AB, CD; therefore CF is the greatest common measure of AB, CD.

    PORISM. From this it is manifest that, if a number measure two numbers, it will also measure their greatest common measure. Q. E. D.

Euclid calls a prime a number 'measured by an unit alone' (Book VII, Definition 11), while Nicomachus calls it 'prime and incomposite' and files it among the odd numbers (I.11). What does each way of defining a prime make you notice, and what does each hide?

  • On Euclid's Definition 11, does the number 2 count as prime? Where would Nicomachus put it, given that he sorts primes among the odd numbers?
  • Nicomachus describes a sieve (I.13) that separates primes from composites by a procedure. Does knowing how to find primes tell you what a prime is?
  • In VII.1 and VII.2 Euclid subtracts the smaller number from the larger again and again. What does he assume about what it means for one number to 'measure' another?

Keep notes on the seminars page →

Where arithmetic is used

Self-administered checks and self-assessed tasks: no credential is awarded. The design borrows from Khan Academy (mastery levels), WGU (competencies proved by assessment) and St. John's College (seminars on primary texts); this site is not affiliated with any of them.