Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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 $\leq 101$ dividing N. If one wants an actual Factorization object for N, then it can be obtained as

Factorization( L )