This repo contains a collection of number theory utilities. The utilities are divided into the following categories:
- Prime Numbers
- Primality Testing
- Trial Division method
- Miller-Rabin primality test
- Prime Generation
- Sieve of Atkin
- Primality Testing
- Factorization
- Pollard's rho algorithm
- Trial Division method
- Number Theory Functions
- Euler's Totient Function
- Greatest Common Divisor (GCD)
- Least Common Multiple (LCM)
The project is divided into the 4 binaries:
is_prime
: Tests whether a given number is prime using primality testing algorithms.factorize
: Decomposes numbers into their prime factors using factorization methods.primesieve
: Generates all prime numbers up to a specified limit.totient
: Calculates Euler's totient function φ(n), counting numbers coprime to n.