// // code for Theorem 2.2 for N=33 // C:=SmallModularCurve(33); //gives a modular curve X_0(33) SimplifiedModel(C); //gives C=X_0(33) in the form y^2=f_33(x) A:={}; S:=[0..8]; for m in S do for n in S do if ((m mod 2) ne 0) or ((n mod 2) ne 0) then //because (m,n)=1 f:=m^8+10*m^6*n^2-8*m^5*n^3+47*m^4*n^4-40*m^3*n^5+82*m^2*n^6-44*m*n^7+33*n^8; //this is n^8d=Ds^2 from (2), obtained by putting x=m/n in SimplifiedModel(C) from above and multiplying with the denominator n^8 A:=A join {f mod 8}; //we put the residues modulo 8 in the set A end if; end for; end for; A; //in the end the set A will contain all possible values of Ds^2 modulo 8, for Ds^2 from (2)