3

I'm not familiar with Diophantine equations. I would like to solve the following equation: $$l^2+m^2+n^2=p^3+q^3$$ where $l,m,n,p,q\in\mathbb{N}$.

I need a list of solutions where $l^2+m^2+n^2$ < 10000.

For the sake of simplicity, one can assume $l \le m \le n$ and $p \le q$.

Some numerical simulations would be useful and helpful too.

I appreciate your effort.

VividD
  • 16,196
  • 1
    There are a large number of solutions to this. It would be helpful if you were more specific on what type of solution you are looking for (parametrics, asymptotics, or just any infinite family of solutions). – Erick Wong Jan 08 '15 at 08:09
  • @ErickWong, I updated the question. Hopefully this makes more sense. – VividD Jan 08 '15 at 08:14
  • A similar equation there. http://math.stackexchange.com/questions/1010994/how-do-you-solve-a2b2c2-d3/1013063#1013063 – individ Jan 08 '15 at 08:20
  • @individ Yes, thanks, it is truly similar. I guess parametric solution for my question would be extremely bulky. But I am just more interested in specific solutions (where both sides are < 10000) rather that formula for all solutions. – VividD Jan 08 '15 at 08:26
  • Not I decide what would be the formula for solving the equation. This solves equation itself. – individ Jan 08 '15 at 08:36
  • Yes, just do it numerically. A quick calculation yields 199 possible values of $l^2+m^2+n^2 < 10000$. – orion Jan 08 '15 at 09:04
  • 1
    It is known that a number $n$ is a sum of three squares if and only if $n \neq 4^a(8k+7)$ for some $a,k\geq 0$. So it is just a case of finding all such numbers below $10000$ (or as said above just do a computer search since each of $l,m,n$ must be less than $100$). – fretty Jan 08 '15 at 09:10

3 Answers3

2

Quick and extremely non-pythonic python code for this. Could be done much more elegantly but this was written in a minute so don't judge. There are 9728 solutions.

leftside = set()
rightside = set()

lhs = dict()
rhs = dict()

for l in range(101):
    for m in range(l,101):
        (p,q)=(l,m)
        value=p**3+q**3
        if value<10000:
            rightside.add(value)
            if value not in rhs:
                rhs[value]=list()
            rhs[value].append((p,q))

        for n in range(m,101):
            value=l**2+m**2+n**2
            if value<10000:
                leftside.add(value)
                if value not in lhs:
                    lhs[value]=list()
                lhs[value].append((l,m,n))

possibles = leftside & rightside

for v in possibles:
    for lmn in lhs[v]:
        for pq in rhs[v]:
            print(lmn,pq)
VividD
  • 16,196
orion
  • 16,154
  • 1
  • 34
  • 45
2

This is not an answer, but rather an extended comment to the question and the answer. It contains some visuals that may be interesting for others, so I am attaching it here.

I organized numbers from 1 to 10000 in a grid 100 x 100, and marked each number if it can be represented as a sum of three squares and/or two cubes.

Numbers < 10000 that are sum of three squares:

enter image description here

Numbers < 10000 that are sum of two cubes:

enter image description here

Numbers < 10000 that are both sum of three squares and sum of two cubes: (almost the same as previous pic, but with jus few fields less)

enter image description here

It should be said that there are much more solutions to the original equation than marked points in the last picture, since each marked point can correspond to more than one solution.

VividD
  • 16,196
1

If the equations:

$$A^2+B^2+C^2=X^3+Y^3$$

For ease of calculation, let's make a replacement.

$$t=(a^2+r^2)(z^2-k^2)+2j^2-2nj-n^2$$

$$s=2z(2n-j)$$

$$q=(a^2+r^2)(z^2-k^2)+2j^2-4nj+3n^2$$

$$p=2k(2n-j)$$

$$y=(a^2+r^2)(z^2-k^2)+2nj-n^2$$

Where $a,r,z,k,n,j$ - integers asked us. You can use numbers if you reduce them to common divisor. Knowing these numbers can be written solutions.

$$A=a(s((a^2+r^2)p^2-y^2+qy-q^2)+tp(2q-y))$$

$$B=r(s((a^2+r^2)p^2-y^2+qy-q^2)+tp(2q-y))$$

$$C=t(y^2+q^2-qy-(a^2+r^2)p^2)+(a^2+r^2)ps(2q-y)$$

$$X=q^2+(a^2+r^2)p^2-y^2$$

$$Y=y(2q-y)$$

You can also write another formula, but it will look more bulky. It is necessary to consider that may need to be divided into common divisor. $(A,B,C)$ on $l^3$ . $(X,Y)$ on $l^2$

individ
  • 4,405