Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 4 years ago

Moondoggy gravatar image

How do I write a code which gives me all prime ideals up to a specific norm?

I am new to sage. This program should give me all prime ideals in OK with K=Q(i) up to norm 5. So far I have :

sage: K.<a> = QuadraticField(-1)
for j in range(5):
L= K.ideals_of_bdd_norm(j)
if L.is_prime():
print L