Olivier, Wow, I sure thank you for that: I had no idea what it meant, and my eyes hurt from searching. Now I am curious again: what does your notation =!= mean; is that something from Mathematica syntax? >Just a warning >p || m is not equivalent to m == 0 (mod p). >but to the conjunction (m == 0 (mod p) AND m =!= 0 (mod p^2)) >like wise...