Looking at the information on mpz_legendre() in the manual, it claims that it is only defined for p being an odd positive prime. I have tried using mpz_legendre() with p=2 and it seems to work as expected, is this correct? -- Andrew Friedley