Attention Math Nerds
Define f : ℤ_n -> ℤ_n by f(x) = x^2
For which n ∈ ℕ is f injective?
Nobody in the class got it right. He told us to ponder it. I know x ≡ -x must be true, and this means n = 1 or n = 2 but I can't prove it. So x ≡ -x leads to 2x ≡ 0 mod n, which leads to 2x = kn + 0, from here if I could just prove k is odd I'd be done, but I can't.
So, any clues or insights on how to show k is odd or any completely different way to solve this problem?