#   This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dennis Sweeney Dennis Sweeney, christian.heimes, jfine2358, mark.dickinson, remi.lapeyre, rhettinger, serhiy.storchaka, steven.daprano, tim.peters, trrhodes 2020-05-06.20:25:00 -1.0 Yes <1588796701.24.0.922205195441.issue40028@roundup.psfhosted.org>
Content
```For some more ideas for features or APIs, you could look at: https://docs.sympy.org/latest/modules/ntheory.html or http://doc.sagemath.org/html/en/reference/rings_standard/sage/arith/misc.html for an absolute upper bound.

If there's to be a minimal number theory (imath?) module, I would interested in what's below. I'm a math student so perhaps my workload is perhaps not representative of most people (and I can turn to tools like SageMath for most of this), but nonetheless here would be my wishlist for the stdlib.

- prime_factors(n): iterator or tuple of prime factors in multiplicity
- factorization(n): like collections.Counter(prime_factors(n))
- divisors(n): iterator for divisors based on factorization
- is_prime(n, bases=20): do some randomized Miller-Rabin
- crt(moduli, values): Chinese Remainder Theorem
- xgcd(numbers) -> tuple[int, tuple[int]]: use the extended euclidean algorithm to find gcd and Bezout coefficients
- generate_primes(start=2)
- next_prime(n) / prev_prime(n)
- prime_range(a, b)
- is_square(n) (maybe is_nth_power?)
- multiplicity(p, n): maximal r such that p**r divides n
- primitive_root(modulus)
- multinomial(n, *ks)