Number Theoretic Functions

The Wolfram Language contains the world's largest collection of number theoretic functions, many based on specially developed algorithms.

Primes and Their Distribution »

Prime the n th prime

PrimeQ test for primality

NextPrime  ▪  PrimePi  ▪  PrimeOmega  ▪  LogIntegral  ▪  Zeta  ▪  ZetaZero  ▪  ...

Integer Factorization »

FactorInteger find the factors of an integer

SquareFreeQ  ▪  PrimePowerQ  ▪  ...

Divisibility

GCD  ▪  LCM  ▪  Divisible  ▪  CoprimeQ  ▪  ExtendedGCD  ▪  ModularInverse

EulerPhi  ▪  MoebiusMu  ▪  JacobiSymbol  ▪  KroneckerSymbol

Congruences

Mod  ▪  PowerMod  ▪  MultiplicativeOrder  ▪  PrimitiveRoot  ▪  PrimitiveRootList  ▪  ChineseRemainder  ▪  PowerModList  ▪  CarmichaelLambda

Divisors »

Divisors  ▪  DivisorSigma  ▪  DivisorSum  ▪  DedekindEta  ▪  EllipticTheta  ▪  ...

Partitions »

IntegerPartitions  ▪  PartitionsP  ▪  StirlingS1  ▪  StirlingS2  ▪  FrobeniusNumber  ▪  ...

Representations as Sums of Powers

SquaresR  ▪  PowersRepresentations  ▪  EllipticTheta

Digit Representations »

IntegerDigits  ▪  NumberDigit  ▪  FromDigits  ▪  DigitCount  ▪  IntegerReverse  ▪  IntegerExponent  ▪  Log2  ▪  ...

Multiplicative Number Theory »

MoebiusMu  ▪  EulerPhi  ▪  DivisorSigma  ▪  MangoldtLambda  ▪  PrimeNu  ▪  ...

Analytic Number Theory »

Zeta  ▪  ZetaZero  ▪  RiemannSiegelZ  ▪  LerchPhi  ▪  DirichletL  ▪  RamanujanTau  ▪  ...

Additive Number Theory »

PartitionsP  ▪  PartitionsQ  ▪  BellB  ▪  SquaresR  ▪  ...

Algebraic Number Theory »

AlgebraicNumberNorm  ▪  NumberFieldDiscriminant  ▪  ...