I have the following code:
sage:R.<x>=QQ[]
f=x^2-x+6
K.<a>=NumberField(f)
cl = K.class_group()
L=K.ideal(23)
S=ideal(4,a+1)
S.is_integral()
sage: for norm, ideals in K.ideals_of_bdd_norm(50).items():
for J in ideals:
for N in range(5):
if (J.is_coprime(L*N)):
if(J!=cl.one()):
if(4*J.norm()-1 in L*N):
print norm,J,N
The output is :
True
6 Fractional ideal (6, a + 2) 1
6 Fractional ideal (a - 1) 1
6 Fractional ideal (a) 1
6 Fractional ideal (6, a + 3) 1
29 Fractional ideal (29, a + 18) 1
29 Fractional ideal (29, a + 10) 1
What do I have to do to only get the item 29 Fractional ideal (29, a + 18) 1 ?