2

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.

poetasis
  • 6,338
  • 3
    Hint: Show $2$ is a square modulo $|a-b|,$ and $2$ is a square modulo ofd prime $p$ if and only if $p\equiv\pm 1\pmod 8.$ – Thomas Andrews Aug 21 '21 at 00:11
  • Do you know the formula for primitive Pythagorean triples, $a=u^2-v^2,b=2uv, c=u^2+v^2$ for some $u,v$ relatively prime and not both odd? – Thomas Andrews Aug 21 '21 at 00:14
  • @Thomas Andrews $2$ is not a square. What do you mean? And yes, I know many things about triples as I have been studying them since I developed a new formula for them in $2009$ that generates none of the trivials, doubles, or even-square multiples that Euclid's formula generates. – poetasis Aug 21 '21 at 00:23
  • 1
    @poestasis: The statement means there exists an $x$ such that $x^2\equiv 2\ \left(\textrm{mod}\ |a-b|\right)$. – ultralegend5385 Aug 21 '21 at 00:32
  • 1
    I didn’t say $2$ is a square, I said $2$ is a square modulo $|a-b|.$ – Thomas Andrews Aug 21 '21 at 00:34
  • If you don’t know the terminology “$a$ is a square modulo $m,$” you are going to need to study more about “quadratic residues” before you understand why the prime factors of $|a-b|$ all have this property. – Thomas Andrews Aug 21 '21 at 00:38
  • So there are integer solutions $x^2\equiv 2\pmod p$ when $p=7,17$ and not when $p=3,5,11,13.$ – Thomas Andrews Aug 21 '21 at 00:46
  • @Thomas Andrews. What do squares have to do with this? We're just talking about how, for instance, with $(5,12,13),\quad 12-5=7$ and $7\equiv \pm 1 \pmod 8.$ – poetasis Aug 21 '21 at 01:15
  • 4
    $a-b=(u^2-v^2)-2uv=(u-v)^2-2v^2.$ So $$(u-v)^2\equiv 2v^2\pmod {|a-b|}.$$ Show that since $u,v$ are relatively prime then $\gcd(v,a-b)=1$ which then means we have a solution to $x^2\equiv 2\pmod {|a-b|}.$ – Thomas Andrews Aug 21 '21 at 01:32
  • @Thomas Andrews I follow the equations you showed for mod $|b-a|$ but where does $\pmod 8$ come in? – poetasis Aug 21 '21 at 01:41
  • $u^2 - 2uv - v^2$ is a quadratic form of discriminant $8.$ As we demand $\gcd(u,v) = 1,$ no value of the form is divisible by any prime $q \equiv \pm 3 \pmod 8,$ simply because Legendre symbol $(8 | q)= -1 ; ; ; ; ;$ – Will Jagy Aug 21 '21 at 02:00
  • $x^2\equiv 2\pmod p$ has a solution if and only if $p\equiv \pm 1\pmod 8.$ Proving that requires some work. – Thomas Andrews Aug 21 '21 at 02:01
  • https://math.stackexchange.com/questions/2291070/prime-divisors-of-k2k12/2291224#2291224 – Will Jagy Aug 21 '21 at 02:08
  • @Servaes What does "Reducing mod 8" mean and how do we know it is $1$ or $7$ instead of $3$ or $5$? – poetasis Aug 21 '21 at 12:09
  • There is no difference between $\mod 8$ and $\pmod 8$. Definition: If $C\ne 0$ then $A\equiv B\pmod C$ iff $(A-B)/C\in\Bbb Z.$ We have $(38-14)/8=3\in\Bbb Z$ so $38\equiv 14 \mod 8.$ – DanielWainfleet Aug 23 '21 at 09:17
  • "(...) but only prime power products are produced". Not only primes powers are produced. Take $13^2-2\cdot 5^2=7\cdot 17$. The result is only divisible by primes on the form $\pm 1+8k$, that does not mean that the result itself is a prime power. – cansomeonehelpmeout Aug 25 '21 at 15:07
  • @ cansomeonehelpmeout I stated prime power "products" meaning, for example $7^2\cdot 17 \cdot 23\cdot 31$. Why are only these products produced? – poetasis Aug 25 '21 at 15:26
  • 1
    @poetasis are you asking why every number you get can be expressed as a product of primes or prime powers?? Or are you asking why all the primes that turn up are of the form $8k\pm1$? – Michael Hartley Aug 30 '21 at 04:56
  • Well, when you divide a square number by 8, the remainder can only be 0, 1 or 4 (that's what it means for the square to be "congruent" to 0, 1 or 4 "modulo" 8.)

    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

1 Answers1

1

Let $$a^2+b^2=c^2\tag{1}$$

If $\gcd(a,b,c)=1$ then the solution may be written $$\begin{align}a&=2mn\\b&=m^2-n^2\\c&=m^2+n^2\end{align}$$

We therefore have $b-a=(m+n)^2-2n^2$. Suppose there is a prime $p$ such that $p\mid b-a$. We know that $p\mid m\iff p\mid n$, so we may assume that $p$ divides neither. We can then write $$(m+n)^2\equiv_p 2n^2$$ This means that $2$ is a square in the ring $\Bbb Z_p$. This happens only when $p\equiv_8\pm 1$. Thus all the primes are on this form, which implies that $$b-a\equiv_8 \pm 1$$


$$\left(\frac{2}{p}\right)\equiv_p (-1)^{\frac{p^2-1}{8}}$$

Proof: Notice that $$\begin{align}p-1&\equiv_p 1\cdot (-1)^1\\2&\equiv_p 2\cdot (-1)^2\\p-3&\equiv_p 3\cdot (-1)^3\\&\vdots\\p\pm\frac{p-1}{2}&\equiv_p\frac{p-1}{2}(-1)^{\frac{p-1}{2}}\end{align}$$ Multiplying all the above we get $$2^{\frac{p-1}{2}}\left(\frac{p-1}{2}\right)!\equiv_p \left(\frac{p-1}{2}\right)!(-1)^{\frac{p^2-1}{8}}$$ Since $p\not\mid \left(\frac{p-1}{2}\right)!$ we get $$\left(\frac{2}{p}\right)\equiv_p (-1)^\frac{p^2-1}{8}$$

cansomeonehelpmeout
  • 12,782
  • 3
  • 22
  • 49
  • You lost me with "$(m+n)^2\equiv 2n^2$ and 2 is a square in a ring." You are the 2nd person here to use the wording "$2$ is a square". Also, there are no even numbers here so why mention them? About the only thing I know is that the leg difference is an odd prime. Why prime? Maybe the rest will make sense if you can explain that. – poetasis Aug 21 '21 at 15:52
  • 2
    @poetasis Instead of just throwing your hands in the air when someone says "reducing mod $8$" or "quadratic residue" or "a square mod $n$", consider familiarizing yourself with these terms. After all, your question itself is phrased in terms of congruences, so it is no surprise that answers assume that you are familiar with modular arithmetic. – Servaes Aug 21 '21 at 21:06
  • @poetasis $2$ is not a square when working with the integers $\Bbb Z$, but may be when working over the ring $\Bbb Z_p$. This ring does arithmetic on a clock with $p$ numbers, here. It may be useful to watch some YouTube videos about moduler arithmetic. I have not stated that the leg difference is a prime, what I’m talking about is a prime dividing the length. – cansomeonehelpmeout Aug 24 '21 at 15:16