Prove that $n^2-1$ is divisible by 8 for any odd integers n. 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.
 A: To clarify your proof, note that $m=k(k+1)$ must be an even number, so $k(k+1)=2\ell$ for some integer $\ell$. Now,
$$
n^2-1 = 4k(k+1) = 8\ell, 
$$
which proves your result.

Regarding your concern about divisibility, your example is correct and the true theorem is this:

If $a$ and $b$ divide $n$, where $a$ and $b$ are relatively prime, then $ab$ divides $n$.

A: Basically, you only need to know the following fact:
$$n^2 - 1 = (n-1) \cdot (n + 1).$$
And above is the multiplication of two consecutive even numbers.
Then ?
A: Your proof is fine. In the number $4k(k+1)$, there are two factors of $2$ in the "$4$," and there is one more factor of $2$ in "$k(k+1)$," so in total there are at least three factors of $2$. The key point is that you've written $4k(k+1)$ as $4 \ \cdot \ k(k+1)$ and checked for factors of $2$ in the factor $4$ and the factor $k(k+1)$ separately.
In your example involving $30$, you've found two factors of the number $30$, which is not the same as what you've done in the proof.
