Below is my proof and I am confused about a few points. I am not sure the final lines are correct as I know that showing 2,4 are factors of $4k^2 + 4k$ is enough to prove that it is divisible by 8 and I have looked at some other examples. In an example of 30, both 3 and 6 are factors of 30 but 30 is not divisible by 18. But I am stuck on how to modify this proof to be complete.
To prove this statement, I intend to use direct proof. Since n has to be an odd integer as prescribed in the statement, by the definition of odd numbers, $(2k+1)^2-1$ must be divisible by 8 where $n = 2k+1$ for some integer k. Next, we expand $(2k+1)^2-1$ to be $4k^2 + 4k + 1 - 1$, which simplifies to $4k^2 + 4k$.
First, we use the distributive property to get the following $4(k^2 + k)$. We let $m = k^2 + k$ and therefore $4(k^2 + k)$ = $4m$. Hence, we know that $4k^2 + 4k$ must be divisible by 4.
Then, we use the distributive property to factor 4k from the expression to get $4k(k + 1)$. By the definition of even and odd number, if k is odd then k+1 must be even and if k is even then k+1 is odd. As an integer is Since 2 and 4 are common factors of $4k^2 + 4k$, which means 8 must also be a factor of $4k^2 + 4k$.
$n^2-1$ is therefore divisible by 8 where $n = 2k+1$ for some integer k. Therefore, we have proven that $n^2-1$ is divisible by 8 for any odd integers n.