-1

(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?

Bill Dubuque
  • 272,048
  • $(-1)^x$ can be $-1$ or $1$. What do you mean with "static" in this context ? – Peter Jan 16 '23 at 09:20
  • 2
    Its great that you are starting to learn about proofs! So recall that $9 \equiv 4 \pmod{5}$ since $9-4$ is divisible by $5$. Similarly, $4 \equiv -1 \pmod{5}$ for the same reason. This means that you can substitute $9$ for $4$ and then $4$ for $-1$ in the congruence (hopefully you've already come across the fact that you can substitute like this!) – C Bagshaw Jan 16 '23 at 09:21
  • Very very first step, you want to search when $9^x-2 \equiv 2 [mod 5] $ ; you can simplify the writing, and say : I want to search when $9^x \equiv 4 [mod 5] $ – Lourrran Jan 16 '23 at 09:25
  • 1
    Maybe, you forgot the parantheses. Then, the calculator correctly interpretes $-1^x$ to be $-(1^x)$ which is actually $-1$ for every real $x$. – Peter Jan 16 '23 at 09:40
  • @Peter You're totally right, I have edited my question to prevent more confusion – Nicolas Jan 16 '23 at 09:48
  • By basic congruence laws here in the linked dupe, $!\bmod 5,,$ we have $,9\equiv -1,$ so your congruence is equivalent to $,(-1)^x\equiv -1\iff (-1)^{x-1}\equiv 1\iff x-1\equiv 0\pmod{!\color{#c00}2},$ by $,-1,$ has order $,\color{#c00}2,$ and mod order reduction – Bill Dubuque Jan 16 '23 at 13:59

2 Answers2

0

Since the modulo operation is compatible with summation $+$ and multiplication $\times$ it is also compatible with exponentiation (in the base).

This means that $${a^{b} \bmod d}\equiv (a\bmod d)^b \bmod d$$ thus since $9 \bmod 5 \equiv -1\bmod 5$ we get $$9^x-2\bmod 5\equiv (-1)^x-2\bmod 5\equiv (-1)^x+3\bmod 5$$ and lastly since $$(-1)^x=\begin{cases}1& x\text{ is even}\\ -1& x\text{ is odd}\end{cases}$$ you get the desired result.

b00n heT
  • 16,360
  • 1
  • 36
  • 46
0

First, rewrite the eqation $9^x - 2\equiv 2 \ (\mod 5)$ as the equivalent equation $9^x \equiv 4 \ (\mod 5)$.

We see that $9 \equiv 4 \ (\mod 5)$, which means that we can use a fundamental rule from modular arithmetic since we have a positive exponent: If $a \equiv b \ (\mod c)$, We have $a^n \equiv b^n \ (\mod c), \ n \in Z^+$. We use this rule: \begin{gather} 9^x \equiv 4^x \ (\mod 5) \\ \end{gather}

Now, for even exponents of $4$, the end digit is always going to be 4 (we start with $4^1 = 4$, and then $4^2 = 16$, which means that the end digit of $4^3$ will be the same as the end digit of $4 * 6 = 24$, hence $4$, and so on alternating between $4$ and $6$ as the end digit of $4^x$ depending on if $x$ is odd or even) for even exponents, which means that the expression $4^x$ will be congruent to $4 \mod 5$, and since we already have that $9^x \equiv 4^x \ (\mod 5)$, $9^x$ will hence also be congruent to $4 \mod 5$ for odd choices of $x$.