I'm learning math without a math professor. I need some feedback from community regarding my proof. The book is : "Discrete Mathematics with Applications" by Susanna S. Epp, 5th edition. Exercise 16 from page 226. Please verify my proof.
Prove the following statement: "for all odd integers $a$ and $b$, $b^2-a^2 \neq 4$"
Proof. Let's prove by contradiction. Let say there are two integers $a$ and $b$ and $b^2-a^2 = 4$. Because $a$ and $b$ are odd integers, then $a=2n+1$ and $b=2k+1$, where $n \in Z$ and $k \in Z$. Now let's perform the following computations:
$b^2 - a^2 = (2k+1)^2 - (2n+1)^2 = 4k^2 + 4k + 1 - 4n^2 - 4n - 1 = 4(k^2 + k - n^2 - n) = 4(k^2 - n^2 + k - n) = 4[(k+n)(k-n)+(k-n)] = 4(k-n)(k+n+1) $
So, in order for the expression $b^2 - a^2 = 4(k-n)(k+n+1) $ to be true, $(k-n)(k+n+1)$ must be equal to 1 or -1. Then $k-n = 1$ and $k+n+1 = 1$ or $k-n = -1$ and $k+n+1 = -1$, because both of expressions should be equal to one (or minus one), we have :
$k-n = k+n+1 \implies -n = n + 1 \implies -n-n = 1 \implies -2n = 1 \implies n = -\frac{1}{2} $, so $n$ is not an integer $\blacksquare$