If $\,a^2+b^2\,$ is a prime, how often is $\,(ab)^2+(a+b)^2\,$ a prime too

elementary-number-theorynumber theoryprime numberssequences-and-series

For each prime $\;p\equiv 1\mod 4\;$ a unique decomposition exists as a sum of two squares $\;p=a^2+b^2$.

I ask how often is $\,(ab)^2+(a+b)^2\,$ a prime too.

If we obtain another prime we can repeat the procedure and, eventually, generate a chain of such primes. Up to the first $10^7$ primes, 4999454 primes are congruent to 1 (mod 4), and some computations have given the following results:

  • just $1$ chain of lenght $7$ (starting with $\,p=2\,$ that, even if not congruent to $1$ (mod $4$), is equal to $\,1^2+1^2$)
  • $5$ chains of lenght $6$ (starting with: $5, 23434781, 65715821, 165664753, 176884153$)
  • $159$ chains of lenght $5$ ($0.0032$ %)
  • $3750$ chains of lenght $4$ ($0.075$ %)
  • $57989$ chains of lenght $3$ ($1.16$ %)
  • $592927$ chains of lenght $2$ ($11.86$ %)

We may conjecture that:

  • the lenght of the chains is upper bounded by $7$
  • the only chain of lenght $7$ is the one starting from $\,p=2$ $(2, 5, 13, 61, 1021, 110581, 183198541)$
  • there are infinitely many chains of lenght less than 7

Many thanks for any suggestion, comment or answer.

Best Answer

The 'odds' that a random odd number $\lt 10^7$ is prime are roughly $2/\ln(10^7)\approx1/8$, which comes pretty close to your 11.8% figure. I suspect there's nothing known about this but I would expect them to follow the heuristics. If I'm doing my pre-coffee math correctly, then since abstractly the number you're hoping to be prime is of size $\approx p^2$, heuristically it seems as though chains of arbitrary fixed length should exist: for all $p$, the heuristic probability of a chain of length $n$ starting from $p$ is $\displaystyle\approx \frac1{\ln p}\cdot\frac1{\ln(p^2)}\cdots\frac1{\ln(p^{2^n})} \approx \frac1{2^{n^2/2}\ln^np}$. The constant term is smaller, but this is broadly akin to the probability for Cunningham Chains of length $n$.