In the book Introduction to Analytic Number Theory by Apostol, the Theorem 9.10 (two properties of the Jacobi symbol) states that:
If $P$ is an odd positive integer we have \begin{equation} \tag{7} (-1 \mid P) = (-1)^{(P - 1)/2} \end{equation} and \begin{equation} \tag{8} (2 \mid P) = (-1)^{(P^2 - 1) / 8} \end{equation}
The proof in the book about the second equation is:
(In the proof of (7)) Write $P = p_1 p_2 \cdots p_m$ where prime factors $p_i$ are not necessarily distinct.
To prove (8) we write $$P^2 = \prod_{i = 1}^{m} \left( 1 + p_i^2 - 1\right) = 1 + \sum_{i = 1}^{m} \left( p_i^2 - 1 \right) + \sum_{i \neq j} (p_i^2 - 1)(p_j^2 - 1) + \cdots $$ Since $p_i$ is odd we have $p_i^2 - 1 \equiv 0 \; (\operatorname{mod} 8)$ so $$P^2 \equiv 1 + \sum_{i = 1}^{m} (p_i^2 - 1) (\operatorname{mod} 64)$$ hence $$\frac{1}{8} \left( P^2 - 1 \right) = \sum_{i = 1}^{m} \frac{1}{8} \left( p_i^2 - 1 \right) (\operatorname{mod} 8)$$ This also holds $\operatorname{mod} 2$, hence $$ (2 | P) = \prod_{i = 1}^{m} (2 \mid p_i) = \prod_{i = 1}^{m} (-1)^{(p_i^2 - 1) / 8} = (-1)^{(P^2 - 1) / 8}$$ which proves (8).
My question is that since any odd prime can be written as $2k + 1$ for some $k \in \mathbb N$, then $p_i^2 - 1 = 4k^2 + 4k + 1 - 1 = 4k(k + 1)$. Could I simply say that $p_i^2 - 1 \equiv 0 (\operatorname{mod} 4)$?
Then the proof would look like:
$$P^2 \equiv 1 + \sum_{i = 1}^{m} (p_i^2 - 1) (\operatorname{mod} 16)$$ hence $$\frac{1}{8} \left( P^2 - 1 \right) = \sum_{i = 1}^{m} \frac{1}{8} \left( p_i^2 - 1 \right) (\operatorname{mod} 2)$$
Then we get the result for mod 2 directly unlike the proof in Apostol.
I understand that the proof in Apostol uses the fact that either $k$ or $k + 1$ is even. But it seems like that we don't even need to make that argument.
I would like to know that if my proof is still valid? Thank you!