Hepth said:
As this is not a homework forum ill just break the unspoken rule and ask if writing
4867 = 4*1000+8*100+6*10+7
can help you. You're on the right track but overthinking it.
Even with homework problems there's a point where a bigger hint is acceptable, and sometimes even a big huge hint is OK. At this point, it's rather obvious that adjacent is struggling, so telling him what 4867 was entirely acceptable.
adjacent said:
Thank you so much! Why couldn't you say this earlier?
What 4867 means is very, very basic. Given that you are dabbling with a number theory problem here, we all expected that you would know what 4867 means.
I will transform my previous equation to match with this.
##11(a^2+b^2+c^2)=(a \times 100)+(b \times 10)+(c \times 1)##
That means ##11(a^2+b^2+c^2)=100a+10b+c##
Now I will have to do WHAT? Brute force?
This is a quadratic Diophantine problem in three variables. One simple solution is to ask Mathematica to solve ##11(a^2+b^2+c^2) == 100 a + 10 b + c## over the integers. That will give solutions such as a=0, b=0, c=0 and a=3,b=-1, c=-4 that you might want to exclude. You can exclude those with additional expressions to constrain a to the positive integers and b and c to the non-negative integers.
Suppose you want to try solving this without using Solve. One simple solution is to look at all 900 numbers of the form
abc with 0<a≤9, 0≤b≤9, and 0≤c≤9. Learn to use Mathematica's list functions. That's extreme brute force, but with only 900 elements it's not going to take too long.
You can do much better than this. Your expression is the equation of a sphere. That expression can be rewritten as ##(a - \frac{100}{22})^2 + (b - \frac{10}{22})^2 + (c-\frac{1}{22})^2 = \frac{10101}{484}##. That's a sphere with radius ##r = \sqrt{10101}\,/22## and center ##(100/22, 10/22, 1/22)##. That means ##(100-\sqrt{10101})/22 \le a \le (100+\sqrt{10101})##, ##(10-\sqrt{10101})/22 \le b \le (10+\sqrt{10101})/22##, and ##(1-\sqrt{10101})/22 \le c \le (1+\sqrt{10101})/22##. Since you are interested in integer values with ##a>0##, ##b,c \ge 0##, this means you only need to look at nine values for a, six for b, and five for c. That reduces the 900 (a,b,c) triples that need to be examined using the first brute force method to only 270 triples.
You can do much better than this. Clearing the denominator in the canonical spherical expression for this problem yields ##(22a - 100)^2 + (22b-10)^2 + (22c-1)^2 = 10101##. Denoting ##u=|22a-100|, v=|22b-10|, w=|22c-1|##, this can be written as ##u^2+v^2+w^2=10101##. This is a sum of three squares problem! Ignoring permutations of (u,v,w) and changes in sign, there are only 20 values of (u,v,w) that satisfy ##u^2+v^2+w^2=10101##. Filtering on the five possible values of w=|22c-1|=(1,21,43,65,87) for c=(0,1,2,3,4) yields just five (u,v,w) triples that need to be investigated, three for w=1 (c=0) and two for w=65 (c=3).
The Mathematica function
PowersRepresentations give you the 20 integer solutions to ##u^2+v^2+w^2=10101##. I'll leave filtering those to yield the desired solutions to your problem up to you.