Are there integers $a,b,c,d,e,n$ such that $a^3-nb^3=c^3-nd^3=e^3$?

115 Views Asked by At

Can anyone help me find (with a computer search) nonzero integers $a,b,c,d,e,n$ such that $$a^3-nb^3=c^3-nd^3=e^3$$ where $(a,b,e)$ and $(c,d,e)$ are pairwise coprime and $n^2\ne 1$

One solution set will do. Thanks.

1

There are 1 best solutions below

4
On BEST ANSWER

TL;DR

Computer search gives us these solutions $$\begin{cases}a = -5 \\ b = -2 \\ c = 2 \\ d = -1 \\ e = 3 \\ n = 19\end{cases} \ \begin{cases}a = -5 \\ b = 2 \\ c = 2 \\ d = 1 \\ e = 3 \\ n = -19\end{cases} \ \begin{cases}a = -2 \\ b = -1 \\ c = 5 \\ d = -2 \\ e = -3 \\ n = -19\end{cases} \ \begin{cases}a = -2 \\ b = 1 \\ c = 5 \\ d = 2 \\ e = -3 \\ n = 19\end{cases} $$ after removing those obtained by permuting $(a, b)$ and $(c, d)$.


Method

We first use the diophantine function from SymPy to solve the diophantine equation $A - n B = C - n D$, which gives us the parametric solution $$\begin{cases}A = t_0 \\ B = t_1 \\ C = t_0 + n t_2 \\ D = t_1 + t_2 \\ E = t_0 - n t_1\end{cases}$$ (Actually, diophantine doesn't support variable coefficient. But we can let $n = 2, 3, 4, \dots$ and guess the correct parametric solution.)

Then, we substitute $t_0 = a^3, t_1 = b^3$ and $t_2 = t$ to get the parametric solution $$\begin{cases}a = a \\ b = b \\ c = \sqrt[3]{a^3 + n t} \\ d = \sqrt[3]{b^3 + t} \\ e = \sqrt[3]{a^3 - n b^3} \end{cases}$$

Finally, we use Python 3 to check all integers in $[[-M, M]] = [[-32, 32]]$ for the parameters $a, b, n, t$ and obtain a solution.

Python 3 script for the final step:

# To the extent possible under law, the author(s) have dedicated all copyright
# and related and neighboring rights to this software to the public domain
# worldwide. This software is distributed without any warranty. 

# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <https://creativecommons.org/publicdomain/zero/1.0/>.


import itertools
import math


def sgn(x):
    return math.copysign(1, x)

def sym_itv(M):
    """return the integer interval [[-M, M]]"""
    return range(-M, M + 1)

def sym_itv_wo_0(M):
    "return the union of integer intervals [[-M, -1]] and [[1, M]]"
    return itertools.chain(range(-M, 0), range(1, M + 1))

def sym_itv_wo_0_pm_1(M):
    "return the union of integer intervals [[-M, -2]] nad [[2, M]]"
    return itertools.chain(range(-M, -1), range(2, M + 1))

def cubert(x):
    return round(sgn(x) * abs(x)**(1/3))

def is_cube(x):
    return cubert(x) ** 3 == x


M = 32

for a, b, n, t in itertools.product(sym_itv_wo_0(M),
                                    sym_itv_wo_0(M),
                                    sym_itv_wo_0_pm_1(M),
                                    sym_itv(M)):
    
    c_cube = a ** 3 + n * t
    d_cube = b ** 3 + t
    e_cube = a ** 3 - n * b ** 3

    if any(not is_cube(x) for x in [c_cube, d_cube, e_cube]):
        continue

    c = cubert(c_cube)
    d = cubert(d_cube)
    e = cubert(e_cube)

    if (a, b) != (c, d) and c != 0 and d != 0 and \
       math.gcd(a, b) == math.gcd(a, e) == math.gcd(b, e) == 1 and \
       math.gcd(c, d) == math.gcd(c, e) == math.gcd(d, e) == 1:
        print('a = {a}, b = {b}, c = {c}, d = {d}, e = {e}, n = {n}'.format(
            a=a, b=b, c=c, d=d, e=e, n=n))

Python 3 script for the first step:

# To the extent possible under law, the author(s) have dedicated all copyright
# and related and neighboring rights to this software to the public domain
# worldwide. This software is distributed without any warranty. 

# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <https://creativecommons.org/publicdomain/zero/1.0/>.


import sympy


A, B, C, D = sympy.symbols('A B C D', integer=True)

for n in range(2, 17):
    sympy.pretty_print(sympy.diophantine(A - n * B - C + n * D))