Search the documentation

Type to search. Use ↑ and ↓ to move, Enter to open.

Primality testing

Deciding whether n is prime, by trial division or probabilistic tests such as Miller-Rabin.

2
projects
2
run in the browser
Defining formula
a n−1≡1(modn)a^{\,n-1} \equiv 1 \pmod n

Fermat’s test: every prime n passes it; a composite n usually fails for a random a.

On this page

Projects that use it

Neighbourhood in the knowledge graph

Primality testingNumber theory and algebraNumber Theory ExplorerCryptography in CEuclidean algorithmModular arithmeticModular exponentiationPrime sievesEuler's totient functionArithmetic functionsLinear recurrencesCryptography Performance AnalysisSorting Algorithms VisualizationBlock ciphersFinite fieldsCryptographic hash functionsMessage authentication codesRSAArbitrary-precision arithmeticSolvatore
ProjectsConceptsDomainsShow in graph →