Prime Numbers

Compute a prime factorization:

factor 70560

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

1,000,000th prime

Generate a list of primes:

primes <= 100

Divisors

Compute the divisors of an integer:

divisors 3600

Compute a greatest common divisor:

gcd 24, 36, 48, 60

Diophantine Equations

Solve a Diophantine equation:

solve 3x+4y=5 over the integers

Digit Sums

Sum the digits of an integer:

add up the digits of 2567345

Compute the digit sum in another base:

sum of digits of 29225 in base 2

Special Numbers

Compute a polygonal number:

5th hexagonal number

Determine whether a number belongs to a given class:

Does the set of perfect numbers contain 18?

Find numbers matching specified criteria:

20 greatest triangular numbers < 500

Generate Pascal's triangle:

7 rows of Pascal's triangle

Number Theoretic Functions

Get information about a number theoretic function:

Euler phi

Do computations with number theoretic functions:

phi(110)

Continued Fractions

Find the continued fraction representation of a number:

continued fraction sqrt(2)

Find continued fraction representations of a function:

continued fraction tan x

Algebraic Numbers

Identify algebraic integers and units:

Is 1/(1+sqrt(5)) an algebraic integer?

Find the minimal polynomial of an algebraic number:

minimal polynomial sqrt(2)+sqrt(3)