(I'm new to proofs) I'm not really sure how to prove that if x is a positive integer then $9^x − 2$ mod $5 = 2$ is equivalent to x being odd.
I assume I have to show the biimplikation of: $9^x − 2$ mod $5 = 2 ⟷ x = 2k + 1$
I know some people have calculated the following for their proof but I'm not exactly sure how they got to that result and how to use it in a proof:
$9^x-2$ mod $5=4^x-2$ mod $5=(-1)^x-2$ mod $5$
I do realize they subtract 5 each time from the base number of the exponent so the expression ideally would be in the same equivalance class. I just don't think that $(-1)^x$ would be in the same equivalance class since it's essantially a static number that always results in -1. Edit: I forgot the parantheses when calculating the result so I always got -1
How would I attempt to write this proof and is my classmates' approach usable?