This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
Number Theory
Packing a large number of sophisticated algorithms—many recent and original—into a powerful collection of functions, Mathematica draws on almost every major result in number theory. A key tool for two decades in the advance of the field, Mathematica's symbolic architecture and web of highly efficient algorithms make it a unique platform for number theoretic experiment, discovery and proof.
FactorInteger find the factors of an integer
PrimeQ test whether an integer is prime
Prime  ▪ NextPrime  ▪ PrimePi  ▪ EulerPhi  ▪ MoebiusMu  ▪ JacobiSymbol  ▪ ...
Zeta  ▪ LerchPhi  ▪ LogIntegral  ▪ RiemannSiegelZ  ▪ ZetaZero  ▪ Sum  ▪ ...
    
PowerMod modular powers, roots and inverses
    
Reduce find general solutions to Diophantine equations
FindInstance search for particular solutions to Diophantine equations
    
Element test field, ring, etc. memberships
Integers  ▪ Rationals  ▪ Reals  ▪ Algebraics  ▪ Primes
    
Root represent an algebraic number
RootReduce reduce algebraic numbers to canonical form
GaussianIntegers allow factorization over Gaussian integers
    
Rationalize find rational approximations
LatticeReduce find short bases in integer lattices
    
IntegerDigits  ▪ RealDigits  ▪ FromDigits  ▪ DigitCount  ▪ ...
    
IntegerPartitions find restricted and unrestricted partitions of integers
PowersRepresentations find representations of integers as sums of powers
    
ToNumberField operate in a given algebraic number field
TUTORIALS
MORE ABOUT