This question was inspired by the following question.
https://mathoverflow.net/questions/132532/goldbachs-conjecture-and-eulers-idoneal-numbers
Here, we are not looking to factor an integer $N$. We are looking for solutions $n$ to the equation $n^2=pq+y^2$. It turns out that the solutions are many for a given $n$ and are easy to calculate. We need to use the following geometrical figure to help find $p,q,y$ that add up to $n^2$ according to the previous equation.
$$p$$ $$y\phantom{----}y$$ $$q$$
Then we multiply $p$ with $q$ and do the same with the $y's$ and add the result to get $n^2$.
At this point it's useful to choose an integer $n$ to show how the method works. Let $n=10$. We can write $n^2$ as $n^2=10\cdot10=4\cdot25=2\cdot50=5\cdot20$. At this point, we only consider $n^2=10\cdot10$. The factors of $n$ must have the same parity. We see that $n+n=20$. The solutions will use the following values for the pair $(p,q)$.
$$(p,q)=(1,19),(2,18),(3,17),(4,16),(5,15),(6,14),(7,13),(8,12),(9,11)$$
At this point we don't know which value of $y$ to choose. It turns out that we must have $y+p+y=q$ with the assumption that $q>p$, (by the way, this way to do the multiplications can be used even when $(y,y)$ is replaced by $(y,z)$ except in this case the result will not be $n^2$).
The first pair $(1,19)$ will provide a $y=9$. So we do the multiplication to get $1\cdot19+9^2=10^2$. The pair $(7,13)$ will provide $7\cdot13+3^2=10^2$.
To go through every pair we need to increase $p$ by $1$, decrease $q$ by $1$ to keep the same value for $p+q=20$. $(p,q)$ are not necessarily primes. The values for $y^2$ are $9^2,8^2,7^2,6^2,5^2,4^2,3^2,2^2,1^2$ given in the same order as the pairs $(p,q)$.
As stated in the link given above, "clearly, given a set of $y,p,q$, then $n^2−y^2=pq$ and it follows that $n=p+y$ and $n=q−y$. Hence, $2n=p+q$." Only pairs with both $(p,q)$ primes will contribute to the Goldbach conjecture.
I cannot prove that for a given $n$, we will always have pairs with both $(p,q)$ primes.
Does finding the solution to $n^2=pq+y^2$ help in any way with the Goldbach conjecture?
\cdotcommand for multiplication. – Apr 15 '19 at 13:48