Firstly, since n+215k is n mod 215 for any n and k in the integers, we know that (1+215k)^3 must be 1 mod 215 = 2^0 mod 215, and similarly for the others cases stated ((6+215k)^3 = 2^0 mod 215, and (7+215k)^3 = 2^7 mod 215).
So it suffices to check on the integers in the set [0, 214], then use the equivalence classes to quickly generate the rest.
|