Skip to content

MATH3080 · Method · Chapter 8 · Primality testing

Miller–Rabin test

10 steps of prerequisites below it

Write n − 1 = 2^s d, draw k independent uniform bases and run the strong round on each; any failure proves n composite, and otherwise the verdict is probable prime.

Taught in

Builds on

Used by

Everything this builds on, earliest first · 27 steps

Each step comes after its own prerequisites, so reading in this order never needs something you have not met. It is a reading order for these notes, not a diagnosis of what you know.

  1. Divisibility · 1.1
  2. Greatest common divisor · 1.1
  3. Division with remainder · 1.1
  4. Euclid's invariant · 1.2
  5. Euclidean algorithm · 1.1
  6. Extended Euclidean invariant · 1.2
  7. Bézout identity · 1.1
  8. Congruence · 2.1
  9. Unit · 2.1
  10. Unit group · 2.2
  11. Euler's function · 3.1
  12. Euler's theorem · 3.1
  13. Fermat's little theorem · 2.2
  14. Prime · 1.1
  15. Euclid's lemma · 1.1
  16. A nontrivial square root of 1 reveals a factor · 8.1
  17. Coprime · 1.1
  18. Unique factorization · 1.1
  19. Chinese remainder theorem · 2.1
  20. Zero divisor · 2.2
  21. No zero divisors modulo a prime · 2.2
  22. Square roots of one modulo a prime · 2.2
  23. Strong sequence · 8.1
  24. Strong probable prime · 8.1
  25. Multiplicative order · 3.1
  26. Non-coprime bases always fail · 8.3
  27. The half bound · 8.3

Possible roots and a review route need your own answers on these points. None are recorded yet, so none are suggested.

Longest chain down to a starting point

Each step is used by the one above it, across courses where the notes link them. It ends at a point the notes define without another point.

  1. Fermat's little theorem
  2. Euler's theorem
  3. Euler's function
  4. Unit group
  5. Unit
  6. Bézout identity
  7. Euclidean algorithm
  8. Euclid's invariant
  9. Greatest common divisor
  10. Divisibility

Back to the graph →Read the note 8.1 →

Vercel visit statistics and public-page performance measurements each require separate consent. Neither is needed to use the website.

Website function storage (used when needed)

Security, sign-in and your chosen preferences use storage when needed. This is separate from optional statistics.

Withdrawing stops future statistics. The page reloads if analytics code needs unloading. It does not delete data already sent.

Read Cookie and storage details