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: | |
| test_Fermat | (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): | |
| phi_data | set_type: (int n, int phi_n, [int] prime_factors_phi) | type gathering a modulus, its totient, and the totient's prime divisors |
| phi_data_of | (int n) = phi_data: | |
| prime_phi_data | (int p) = phi_data: (p,p-1,prime_divisors(p-1)) | |
| is_multiplicative_generator | (int i, phi_data(n,phi,factors)) = bool: | |
| is_multiplicative_generator | (int i, int n) = bool: | |
| search_probable_generator | (phi_data d) = int: | |
| search_probable_generator | (int n) = 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 |