Examples by Topic

Number Theory

 
Mathematics
Number Theory
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

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

generate Pascal's triangle

7 rows of Pascal's triangle

compute a polygonal number

5th hexagonal number

get information about a number-theoretic function

Euler phi

do computations with number-theoretic functions

phi(110)

find the continued fraction representation of a number

continued fraction sqrt(2)

find continued fraction representations of a function

continued fraction tan x

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)