Examples for

Number Theory

Number theory is a branch of mathematics dealing with whole numbers and their properties. Prime numbers, divisors and Diophantine equations, among others, are important related concepts. Applications of modern number theory are numerous, including topics that range from elliptic-curve cryptography to music theory.

Prime Numbers

Primes are the building blocks of the naturals. Compute prime factorizations, find nth primes or make lists of primes.

Compute a prime factorization:

Specify a prime by its position in the sequence 2, 3, 5, ...:

Generate a list of primes:

More examples
Diophantine Equations

Solve equations with one or many unknowns, considering only integer solutions.

Solve a Diophantine equation:

Number Type Arithmetic

Find the most specific number type that encompasses all possible outputs from an expression involving general number types.

Determine parity:

Determine sign:

Determine number type:

More examples
Divisors

Test if a number divides another, compute a number's divisors or find the greatest common divisor for a set of numbers.

Compute the divisors of an integer:

Compute a greatest common divisor:

More examples
Digit Sums

Convert numbers between bases and compute the sum of their digits.

Sum the digits of an integer:

Compute the digit sum in another base:

Continued Fractions

Compute the finite or infinite continued fraction representations of numbers and functions.

Find the continued fraction representation of a number:

Find continued fraction representations of a function:

More examples

GO FURTHER

Step-by-Step Solutions for Discrete Mathematics

RELATED EXAMPLES

  • Algebraic Numbers
  • Discrete Mathematics
  • Equation Solving
  • Numbers
  • Number Theoretic Functions
  • Special Numbers

    Work with notable integers and classes of integers, such as the polygonal numbers and the binomial coefficients.

    Compute a polygonal number:

    Determine whether a number belongs to a given class:

    Find numbers matching specified criteria:

    Generate Pascal's triangle:

    More examples