This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
Number Theoretic Functions
Mathematica contains the world's largest collection of number theoretic functions, many based on specially developed algorithms.
Prime the nth prime
PrimeQ test for primality
NextPrime  ▪ PrimePi  ▪ LogIntegral  ▪ Zeta  ▪ ZetaZero
Integer Factorization
FactorInteger find the factors of an integer
Divisibility
GCD  ▪ LCM  ▪ Divisible  ▪ CoprimeQ  ▪ ExtendedGCD
Congruences
Divisors
Partitions
Representations as Sums of Powers
Analytic Number Theory
TUTORIALS
MORE ABOUT