Diophantine equation $l^2+m^2+n^2=p^3+q^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.
 A: 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)

A: 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:

Numbers < 10000 that are sum of two cubes:

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)

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.
A: 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$
