I want you to check my proof:
$(\forall (x,y) \in \mathbb{N}^2)$ prove that if $2^x = 3y+1$ then $x$ is even and if $2^x = 3y+2$ then $x$ is odd.
$\underline{\textbf{Proof}}$: To solve this problem, we will put 2 cases, one in which $x$ is even and the other for $x$ as an odd number.
Let's go:
- Case 1: Suppose $x$ is even so $x = 2a$ where $a \in \mathbb{N}$, so we can write that $2^x = 2^{2a} = 4^a$. And because $ 4 \equiv 1 \pmod 3$ then $4^a \equiv 1 \pmod 3$ and we remark that $4^a \not\equiv 2 \pmod 3$. And we're done for $x$ even.
- Case 2: Suppose now $x$ is odd. To solve this case we will use that fact that now $x=2a+1$ so $2^x = 2^{2a+1} = 4^a\times2$ and we know that $4^a \equiv 1 \pmod 3 \Longrightarrow 4^a\times2 \equiv 2 \pmod 3 \Longrightarrow 4^a\times2 \not\equiv 1 \pmod 3$. And we're done for $x$ odd.
HINT Use the fact that $2^{2k} \equiv 1 \bmod 3$ and $2^{2k + 1} \equiv 2 \bmod 3$ because $2^{2k} = 4^{k} \equiv 1^k \equiv 1 \bmod 3$