Find all integers k such that : gcd(4*M +1, k*M+1) = 1 for every integer value of M.
Perhaps I should prove that my previous answer, k = 4 +/- 2^n actually works
Well (4M + 1) is relatively prime to ((4 +/- 2^n)M + 1) if and only if it is also relatively prime to their difference, which is (+/- M*2^n)
And clearly it is. The only prime divisors of (+/- M*2^n) are 2 and prime factors of M. All of these leave a remainder of 1 when they divide (4M+1).
q.e,d.