Number Theory

- The Modulus Operator. The code
`a % b`returns the remainder of $a$ divided by $b$. - The Quotient-Remainder Method. The
`.quo_rem()`method returns the quotient and remainder of $a$ divided by $b$. - The Divides Method. The code
`a.divides(b)`returns`TRUE`of $a$ divides $b$. - The Greatest Common Divisor Command. The command
`gcd(a, b)`returns the greatest common divisor of $a$ and $b$. - The Extended Greatest Common Divisor Command. The command
`xgcd(a, b))`returns the greatest common divisor $d$ of $a$ and $b$ and integers $r$ and $s$ such that $d = ra + sb$. - The Is-Prime Method. The
`.is_prime()`method returns true if the number is prime. - The Random Prime Command. The command
`random_prime(a)`generates a random prime between 2 and $a$. - The Prime Range Command. The command
`prime_range(a,b)`generates a list of primes between $a$ and $b-1$. - The Next Prime Command. The command
`next_prime(a)`returns the next prime after $a$. - The Previous Prime Command. The command
`previous_prime(a)`returns the prime previous to $a$. - The Factor Command. The command
`factor(a)`returns the factorization of $a$. - The Euler phi Function. The command
`euler_phi(n)`returns the the number of positive integers less than or equal to $n$ that are relatively prime to $n$.