Friday, March 3, 2017

Week 4

Last week on "Don't be a Square: The Magic Square of Squares"...

Our brave adventurer made strange discoveries,




new friends.

and a lot of progress.

This time, Vijay continues on and explores non-primitive pythagorean triples.


Non-primitive pythagorean triples $X^2+Y^2=Z^2$ are pythagorean triples where $X$ and $Y$ and not relatively prime. In other words, they can be "reduced."

For example, the pythagorean triple $6^2+8^2=10^2$ is non-primitve because it can be reduced to $3^2+4^2=5^2$


If we include non-primitive triples, then we must also consider Fermat family triples. We eliminated them last time because $Y-X=1$ for Fermat triples, but this is not the case for non-primitive triples.


Last time, we learned about the white arrow and that it meant the that $X+Y$ of one triple equals $Y-X$ of another triple.


Here are all the possible cases for the arrow relation:


$p \times Fermat \rightarrow q \times Fermat$

$p \times Fermat \rightarrow q \times Plato$
$p \times Fermat \rightarrow q \times Pythagoras$
$p \times Plato \rightarrow q \times Fermat$
$p \times Plato \rightarrow q \times Plato$
$p \times Plato \rightarrow q \times Pythagoras$
$p \times Pythagoras \rightarrow q \times Fermat$
$p \times Pythagora \rightarrow q \times Plato$
$p \times Pythagoras \rightarrow q \times Pythagoras$

We need to find out when each of these are possible. Here are the mathematical expressions for the sums and difference of the primitive type of each triangle


$X+Y$ for Fermat:

$\frac{1}{2}\left(\left(1+\sqrt{2}\right)^{2k+1}+\left(1-\sqrt{2}\right)^{2k+1}\right)$

$Y-X$ for Fermat:

$1$

$X+Y$ for Plato:

$2n^2+4n+1$

$Y-X$ for Plato:

$2n^2-1$

$X+Y$ for Pythagoras:

$4m^2+12m+7$

$Y-X$ for Pythagoras:

$4m^2+4m-1$

This means that our list of cases for the arrow relation becomes


$p \times \frac{1}{2}\left(\left(1+\sqrt{2}\right)^{2k+1}+\left(1-\sqrt{2}\right)^{2k+1}\right) = q \times 1$

$p \times \frac{1}{2}\left(\left(1+\sqrt{2}\right)^{2k+1}+\left(1-\sqrt{2}\right)^{2k+1}\right) = q \times 2n^2-1$
$p \times \frac{1}{2}\left(\left(1+\sqrt{2}\right)^{2k+1}+\left(1-\sqrt{2}\right)^{2k+1}\right) = q \times 4m^2+4m-1$
$p \times 2n^2+4n+1 = q \times 1$
$p \times 2n^2+4n+1 = q \times 2n^2-1$
$p \times 2n^2+4n+1 = q \times 4m^2+4m-1$
$p \times 4m^2+12m+7 = q \times 1$
$p \times 4m^2+12m+7 = q \times 2n^2-1$
$p \times 4m^2+12m+7 = q \times 4m^2+4m-1$

Because $X+Y$ and $Y-X$ are $1 \bmod 2$ for a pythagorean triple, modding all these equations by $2$ gives


$p \times 1 \bmod 2 = q \times 1 \bmod 2$

$p \bmod 2 = q \bmod 2$

This means arrows can only be drawn between two odd multiple triples or between two even multiple triples. This also happens to be true for the red, blue and green lines, so we can actually ignore even multiples since a reduced version can be found.


This is something I noticed very recently, but really it's ... something I should have noticed sooner


Anyways, let's look at some of these cases.


$$p \times 2n_1^2+4n_1+1 = q \times 2n_2^2-1$$

$$\frac{p}{q} \times 2n_1^2+4n_1+1 =  2n_2^2-1$$
$$\frac{p}{q} \times n_1^2+2n_1+\frac{1}{2} =  n_2^2-\frac{1}{2}$$
Let $n_2=n_1+k$
$$\frac{p}{q} \times n_1^2+2n_1+\frac{1}{2} =  n_1^2+2n_1k+k^2-\frac{1}{2}$$
$$0=n_1^2+2n_1k+k^2-\frac{1}{2}-\frac{p}{q}n_1^2-\frac{p}{q}2n_1-\frac{p}{q}\frac{1}{2}$$
By the quadratic formula, we get 
$$k=\frac{-2n_1 \pm \sqrt{\left(2n_1\right)^2-4\left(n_1^2-\frac{1}{2}-\frac{p}{q}n_1^2-\frac{p}{q}2n_1-\frac{p}{q}\frac{1}{2}\right)}}{2}$$
$$k=-n_1 \pm \sqrt{\frac{1}{2}+\frac{p}{q}n_1^2+\frac{p}{q}2n_1+\frac{p}{q}\frac{1}{2}}$$
We need
$$\frac{1}{2}+\frac{p}{q}n_1^2+\frac{p}{q}2n_1+\frac{p}{q}\frac{1}{2}=J^2$$
$$\frac{p}{q}n_1^2+\frac{p}{q}2n_1+\frac{p}{q}\frac{1}{2}+\frac{1}{2}-J^2=0$$
By the quadratic equation
$$n_1=\frac{-\frac{p}{q}2 \pm \sqrt{\left(\frac{p}{q}2\right)^2-4\left(\frac{p}{q}\right)\left(\frac{p}{q}\frac{1}{2}+\frac{1}{2}-J^2\right)}}{2\frac{p}{q}}$$
$$n_1=-1 \pm \sqrt{\frac{1}{2}-\frac{1}{2}\frac{q}{p}+\frac{q}{p}J^2}$$
We need
$$\frac{1}{2}-\frac{1}{2}\frac{q}{p}+\frac{q}{p}J^2=L^2$$
$$\frac{q}{p}\left(-\frac{1}{2}+J^2\right)=L^2-\frac{1}{2}$$
$$\frac{p}{q}=\frac{J^2-\frac{1}{2}}{L^2-\frac{1}{2}}$$

To summarize this means

$$\frac{p}{q}=\frac{J^2-\frac{1}{2}}{L^2-\frac{1}{2}}=\frac{2J^2-1}{2L^2-1}$$

$$n_1=L-1$$

$$n_2=J$$



By a similar proofs, we can get equations for three more cases. Here I will rewrite all four of them with clearer variables. $m$ will indicate the multiple of the primitive series while $i$ will indicate the index of the triple in the series



$Plato \rightarrow Plato$

$J$ and $L$ are integers

$$\frac{m_{from}}{m_{to}}=\frac{2J^2-1}{2L^2-1}$$

$$i_{from}=L-1$$

$$i_{to}=J$$



$Pythagoras \rightarrow Pythagoras$

$J$ and $L$ are odd integers

$$\frac{m_{from}}{m_{to}}=\frac{J^2-2}{L^2-2}$$

$$i_{from}=\frac{L-3}{2}$$

$$i_{to}=\frac{J-1}{2}$$


$Pythagoras \rightarrow Plato$

$J$ and $L$ are integers and $L$ is odd

$$\frac{m_{from}}{m_{to}}=\frac{2J^2-1}{L^2-2}$$

$$i_{from}=\frac{L-3}{2}$$

$$i_{to}=J$$


$Plato \rightarrow Pythagoras$

$J$ and $L$ are integers and $J$ is odd

$$\frac{m_{from}}{m_{to}}=\frac{J^2-2}{2L^2-1}$$

$$i_{from}=L-1$$

$$i_{to}=\frac{J-1}{2}$$


If we look a bit closer at
$$\frac{m_{from}}{m_{to}}=\frac{J^2-2}{2L^2-1}$$
$$m_{from}\left(2L^2-1\right)=\left(J^2-2\right)m_{to}$$
Since $J^2$ is an odd square, we can say
$$m_{from}\left(2L^2-1\right)=\left(8\left(\frac{n^2+n}{2}\right)+1-2\right)m_{to}$$
When we mod out by $8$ we get
$$m_{from}\left(2L^2-1\right)=\left(7 \bmod 8\right)m_{to}$$
This chart shows that if $L$ is odd, then $2L^2-1=1 \bmod 8$ and
if $L$ is even, then $2L^2-1=7 \bmod 8$


so if $L$ is odd, we get
$$m_{from}\left(1\bmod8\right)=\left(7 \bmod 8\right)m_{to}$$

$$m_{from} \bmod 8 = -m_{to} \bmod 8$$



if $L$ is even, we get

$$m_{from}\left(7\bmod8\right)=\left(7 \bmod 8\right)m_{to}$$

$$m_{from} \bmod 8 = m_{to} \bmod 8$$



I have not yet tried this out on the other cases.


I have noticed that the arrows between the two families occur in pairs. I will explain more in this week's calculator.


If we again look at
$$m_{from}\left(2L^2-1\right)=\left(J^2-2\right)m_{to}$$
and let $m_{from}=1$ and $m_{to}=1$ then we get the Pellian equation
$$J^2-2L^2=1$$
which can be used to find value of $J$ and $L$ for $m_{from}=1$ and $m_{to}=1$


When an arrow goes to a Fermat family triple, it actually goes to all Fermat family triples of that multiple since they all share the $Y-X$ term.


That leaves only

$p \times \frac{1}{2}\left(\left(1+\sqrt{2}\right)^{2k+1}+\left(1-\sqrt{2}\right)^{2k+1}\right) = q \times 2n^2-1$

$p \times \frac{1}{2}\left(\left(1+\sqrt{2}\right)^{2k+1}+\left(1-\sqrt{2}\right)^{2k+1}\right) = q \times 4m^2+4m-1$

which I have not gotten to yet.


After I examine these two, I will start examining the red, green, and blue line relations.




And that is where I am at.

Here is a calculator that finds where arrows go between according to the equations in this post. The first line tells you the triples in terms of family(index,multiple) while the second line tells you the explicit values of the triples.

To see the arrow pairs, find values of $J$ and $L$ that work for Pythagoras => Plato. Then switch the values of $J$ and $L$ and hit Plato => Pythagoras. You should find a pattern like the picture below. This can also be observed with arrows within the same family. find values for $J$ and $L$ where $J \neq L$ that work for Plato => Plato. and then switch the two values and again try Plato => Plato. The same again works for Pythagoras => Pythagoras.


J:


L: