Main Content

Number Theory

Modular arithmetic operations and sequences of numbers

You can perform elementary number-theoretic operations to find the LCM, GCD, modulus, quotient, and remainder. You also can find prime numbers, and special sequences of numbers, such as harmonic, Bernoulli, and Euler numbers.

Functions

expand all

divisorsDivisors of integer or expression
factorIntegerPowerPerfect power factoring
gcdGCD of numbers and polynomials
isPrimitiveRootDetermine which array elements are primitive roots
lcmLeast common multiple
maxMaximum elements of symbolic input
minMinimum elements of symbolic input
modSymbolic modulus after division
powermodModular exponentiation
quoremQuotient and remainder
remRemainder after division
bernoulliBernoulli numbers and polynomials
eulerEuler numbers and polynomials
fibonacciFibonacci numbers
harmonicHarmonic function (harmonic number)
ratRational fraction approximation (continued fraction)
nextprimeNext prime number
nthprimenth prime number
prevprimePrevious prime number
eulerPhiEuler phi function
jacobiSymbolJacobi symbol