One would think that $\big((2n-1)^2-2k^2\big)$ could be any odd number but it is always $\big|(2n-1)^2-2k^2\big| \in\big\{1, 7,17,23,31,41,\cdots\big\} , (n,k)\in\mathbb{N}, GCD\big((2n-1),k\big)=1$
These numbers are "congruent" to $\pm 1\pmod 8$ but that's just a word to me that means they have a remainder of $1$ or $7$ after division by $8$. Answers and comments so far have referenced things about modularity that I haven't been able to make sense of with online study of wiki, etc.
There are other numbers like $9, 15, 25, 33, \cdots$ that also have this property but only prime power "products" are produced. (Examples: $\space P^0=1,\space 7^2=49,\space 7\cdot 17=119)\space $ Now, given modularity, I can understand that these prime-power-products have a remainder of $\pm 1 \pmod 8$ but it doesn't explain why-primes and why $\pmod 8$.
Can someone help me understand the why-primes part? I'm still wondering why-$\pmod 8$ vs $\pmod 4$ or some other but I may be able to figure out the rest from there.
The odd square A gives remainder 1, and twice an even square (B=2$k^2$) gives remainder 0, so the difference has remainder 1. Sometimes, the difference is negative, so when you take the absolute value, you get a remainder of 7 instead.
As for why the prime factors of $(2n-1)^2 - 2k^2$ are also $8k\pm1$, you need a few more concepts, but they aren't actually very advanced concepts, if you try diligently enough you'll get them.
– Michael Hartley Aug 30 '21 at 07:04