This page contains some number theoretic stuff.
dividesp(b, a) := integerp(b/a); is a predicate for divisibility.divide(a, b); returns the pair [q, r] with a = b*q + r.quotient(a, b); returns the integer q.remainder(a, b); returns the integer r.remainder(a, b); returns the integer r.factor(n); returns the prime factorisation of n.gcd(a, b); returns the greatest common divisor (highest common factor) of a and b.Return to the homepage.