Ask Your Question

Supersingularity's profile - activity

2016-04-05 20:18:42 +0200 commented answer Loop over integers mod p

After looking at your code, I realize my error came from a Python/Sage related syntax error, not a genuine error in using the integers mod p. But thank you for the GF(p) suggestion, which helped shorten my code.

2016-04-05 20:17:52 +0200 received badge  Scholar (source)
2016-04-05 11:28:30 +0200 received badge  Student (source)
2016-04-05 11:28:18 +0200 asked a question 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 $x^2-17 mod p$ for the first 100 primes. My first guess is to type out the proper code to factor $x^2-17$ 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?