Let us fix two primes $p,q$ with $2<p<q$. How can we find positive integers $a,b$ which solve the equation $a^2+b^4=pq$ without brute force?
Interestingly there exist sometimes two solutions:
- $5\cdot13=7^2+2^4=8^2+1^4$
- $5\cdot821=3^2+8^4=53^2+6^4$
- $17\cdot113=25^2+6^4=36^2+5^4$
In more rare cases I even obtain three solutions, e.g.:
- $73\cdot89=49^2+8^4=64^2+7^4=79^2+4^4$
Is there a systematic way to obtain the solutions $a,b$ directly? Or at least, can we establish a relationship between the two primes and these natural solutions? I generated a CSV file containing some more cases, which maybe help in finding patterns or connections between $p,q$ and $a,b$.
Can we anticipate (state in advance) how many positive integer solutions we will get depending on $p,q$?
Given $\quad a^2+b^4=pq\quad$ we can use a formula for generating Pythagorean triples where $C-A=2\qquad$ Here, $\quad A=4n^2-1\quad B=4n\quad C=4n^2+1.\qquad$ If we let $\quad b^4=4n\quad$ we find integer $n-values$ when $B\in\big\{2,4,6,8,\cdots\big\}$ These correspond to the triples
$$(63,16,65)\qquad (16383,256,16385)\qquad (419903,1296,419905)\\ (4194303,4096,4194305)\qquad (24999999,10000,25000001)\qquad \cdots$$
In these cases, we can see the $C$=values are composite and easily represented as $pq$, but whether or not $pq$ are prime must be determined for each case.
We can find more "candidates" but still have to check $pq$ for primality by using Euclid's formulas shown here as $ \qquad A=m^2-k^2\qquad B=2mk \qquad C=m^2+k^2.\qquad$ If we solve the $B$-function for $k$, we need only test a defined range of $m$=values to see which yield integers for $k$.
\begin{equation} B=2mk\implies k=\frac{B}{2m}\qquad\text{for}\qquad \bigg\lfloor \frac{1+\sqrt{2B+1}}{2}\bigg\rfloor \le m \le \frac{B}{2} \end{equation} The lower limit ensures $m>k$ and the upper limit ensures $m\ge 2$ $$B=16\implies\qquad \bigg\lfloor \frac{1+\sqrt{32+1}}{2}\bigg\rfloor =3 \le m \le \frac{16}{2}=8\\ \land \quad m\in\{8\}\implies k\in\{1\}$$ $$F(8,1)=(63,16,65)\qquad $$
This generates many non-primitives and a few more primitives where each $C$-value must be screened as above. Those primitives corresponding to the above $B$-values are.
$$f(8,1)=(63,16,65)\qquad f(128,1)=(16383,256,16385)\\ f(81,8)=(6497,1296,6625)\qquad f(648,1)=(419903,1296,419905)\\ f(2048,1)=(4194303,4096,4194305)\quad f(625,8)=(390561,10000,390689)\\ f(5000,1)=(24999999,10000,25000001)\qquad $$