Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 0 years ago

Max Alekseyev gravatar image

If you want to know exponents for primes in whatever finite set, then valuation() function can do that for you. In your example, knowing that the number has no prime factors greater than 101, one can get factorization of such number N as

L = [ (p,d) for p in primes(2,102) if (d:=valuation(N,p)) > 0 ]

The list L here contains pairs (prime, exponent) for all primes 101 dividing N. If one wants an actual Factorization object for N, then it can be obtained as

Factorization( L )