# Checks conjecture on the first two coefficients of the # modular polynomial using M. Rubinstein's files: # # phi_.gz # # # (reads from the (new) gzipped ASCII files) import struct, sys, gzip out = open("/tmp/check_phi.out","w") # chage to where you want to save # the output fail=[] for p in prime_range(5,354): f = gzip.open("/scratch/mod_pol/gz/phi_" + str(p) + ".gz", "rb") # change to the location of the stored gzipped ASCII files # we only need the first two lines! a0 = int(f.readline()) a1 = int(f.readline()) va0 = valuation(a0,p) va1 = valuation(a1,p) f.close() print([p, va0, va1]) if (p.mod(6) == 1) and ((va0 != +Infinity) or (va1 != +Infinity)): fail+=[[p, va0, va1]] if (p.mod(6) == 5) and ((va0 != 3) or (va1 != 3)): fail+=[[p, va0, va1 ]] out.write("p = " + str(p)) out.write(": [ " + str(va0) + " , " + str(va1) + " ]\n") out.write("\n\n"); out.write('"Failed" for:\n' + str(fail)) out.close()