1 | initial version |

You can implement a small function

```
def factorize_small_primes(N,bound):
res = [] # list of pairs (prime,multiplicity)
for p in Primes():
if p >= bound:
break
k = N.valuation(p) # the nb k such that p^k || N
res.append((p,k))
N /= p^k
return Factorization(res + [(N,1)])
```

And use it as follows

```
sage: N = 2^3 * 13^5 * 523^2 * 541^3
sage: f = factorize_small_primes(N,20)
sage: f
2^3 * 13^5 * 43310697015709
```

You can also check that the answer is somewaht consistent

```
sage: f.expand() == N
True
```

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.