Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Loop over integers mod p

What is the most efficient way to factor a polynomial mod p for various p all at once, perhaps to be assembled into a table with more fancy code?

For example, suppose I want to factor x217modp for the first 100 primes. My first guess is to type out the proper code to factor x217 over the ring Integers(i) where i runs through an appropriate prime_range. But Sage says I am not allowed to put a variable into Integers(). So what is the best way to do this?