Well, I have the following problem: I need to solve the following system of equations:
$$ \begin{cases} n=a^3+b^3+c^3\\ \\ n=d^3+k^3+f^3 \end{cases}\tag1 $$
Where:
- $n\ne a\ne b\ne c\ne d\ne k\ne f$;
- $1\le a<n,1\le b<n,1\le c<n,1\le d<n,1\le k<n,1\le f<n$;
- $n\in\mathbb{N}^+,a\in\mathbb{N}^+,b\in\mathbb{N}^+,c\in\mathbb{N}^+,d\in\mathbb{N}^+,k\in\mathbb{N}^+,f\in\mathbb{N}^+$
And I want to search for solutions using the following range: $2\le n\le1000^3$.
I thought of the following code:
ParallelTable[{n,Solve[{n==a^3+b^3+c^3,n==d^3+k^3+f^3,
1<=a<n&&1<=b<n&&1<=c<n&&1<=d<n&&1<=k<n&&1<=f<n&&a!=b!=c!=d!=k!=f},
{a,b,c,d,k,f},Integers]},{n,2,1000^3}]
Question: is there a faster way to let Mathematica evaluate this?
EDIT:
After seeing the answer that was posted by @kglr, I wondered can I use that technique to solve the same problem by using more variables:
$$ \begin{cases} n=a^3+b^3+c^3\\ \\ n=d^3+k^3+f^3\\ \\ n=g^3+h^3+m^3\\ \\ n=a^3+k^3+m^3\\ \\ n=g^3+k^3+c^3\\ \\ n=a^3+d^3+g^3\\ \\ n=b^3+k^3+h^3\\ \\ n=c^3+f^3+m^3 \end{cases}\tag2 $$
All the conditions are the same, so they all can not be equal to each other and needs to be an integer bigger than zero.