module

Crystalg::NumberTheory

Instance methods

carmichael(n)
Source
divisor(n)
Source
extgcd(a, b)

returns {gcd(a,b), x, y} such that gcd(a,b) == ax + by

Source
gcd(a, b)
Source
lcm(a, b)
Source
mobius(n)
Source
phi(n)

count the totatives of n that is the positive integers less than or equal to n that are relatively prime to n

Source
phi_list(n)
Source
prime?(n)
Source
prime_factorize(n)
Source
sieve_of_eratosthenes(n)
Source

Nested types