How can I tell whether an integer is the sum of two fourth powers

443 Views Asked by At

The three integers below can be expressed as the sum of two squares. The three integers are:

\begin{align}(1)&&11,572,060,353,961,555,386,606,814,001 \\(2)&&11,573,624,522,376,724,598,676,284,401 \\(3)&&11,575,215,560,569,326,509,742,400,801\end{align}

Can anyone tell me how to use SageMath (Computer Algebra System) to check whether any of these three integers is the sum of two fourth powers ?

1

There are 1 best solutions below

2
On

If $n=(a_1^2+b_1^2)(a_2^2+b_2^2)(a_3^2+b_3^2)(a_4^2+b_4^2)(a_5^2+b_5^2)$, as the OP indicates is the case for one of the numbers, then it suffices to consider $16$ possibilities for $n=A^4+B^4$:

$$A^2+B^2i=(a_1+b_1i)(a_2\pm b_2i)(a_3\pm b_3i)(a_4\pm b_4i)(a_5\pm b_5i)$$

In other words, if you're given a factorization of the number of interest into a handful of primes congruent to $1$ mod $4$, then one approach to testing if the number is a sum of two fourth powers is to express each prime factor as a (unique) sum of two squares, and then test a relatively small number of combinations expressed as Gaussian integers.

Note, though, that finding the squares that sum to a large prime is a nontrivial step.