Script Reference
number_theory.at
Definitions
| Name | Signature | Description |
|---|---|---|
| factorization | (int n) = [int,int]: { (prime,exponent) } | (prime,exponent) |
| easy_factors | (int n, int limit) = ([int,int],int): { (factors,quotient) } | (factors,quotient) |
| prime_divisors | (int n) = [int]: | |
| divisors | (int n) = [int]: | |
| invertibles_modulo | (int n) = [int]: | |
| phi | (int n) = int: | |
| gcd_Bezout_coef | (int !a, int !b) = (int,int): { (d,s) such that d=s*a mod b } | (d,s) such that d=s*a mod b |
| Bezout | ((int,int) (a,b):pair) = (int,int,int): { (d,s,t) with d=s*a+t*b) } | (d,s,t) with d=s*a+t*b) |
| inverse_mod | ((int,int) pair) = int: | |
| power_mod | (int x, int k, int n) = int: | |
| is_Fermat_prime | (int x, int p) = bool: power_mod(x,p,p)=x%p | |
| prime_candidats_after | (int n, [int] sieve_primes) = [int]: | |
| search_probable_prime | ([int] sieve_primes, [int] Fermat_bases) = (int->int): | |
| search_probable_generator | (int p, [int] divisors_phi_p) = int: | |
| expand | (int_poly(X,a,), int k) = int_poly: { substitute X^k for X } | substitute X^k for X |
| cyclotomic_polynomial | (int n) = int_poly: | |
| is_prime | n)=bool:#divisors(n)=2 |