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.

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:

### Diophantine Equations

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

#### Solve a Diophantine equation:

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:

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:

### 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:

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:

### GO FURTHER

Step-by-Step Solutions for Discrete Mathematics### RELATED EXAMPLES

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