Ask Your Question
1

Solving a Diophantine system

asked 2020-09-12 23:00:29 +0100

brennan gravatar image

I am trying to find solutions to the following Diophantine system:

a+b+c=x^2

a^2+b^2+c^2=y^2

a^3+b^3+c^3=z^2

where a,b,c are less than 5000 and where x,y,z are perfect squares

edit retag flag offensive close merge delete

Comments

Should $x$, $y$, $z$ really be perfect squares?

So $a + b + c$, $a^2 + b^2 + c^2$, $a^3 + b^3 + c^3$ are perfect fourth powers?

Or did you mean $a + b + c$, $a^2 + b^2 + c^2$, $a^3 + b^3 + c^3$ are perfect squares?

If so, write one of the following:

  • $a + b + c = x$, $a^2 + b^2 + c^2 = y$, $a^3 + b^3 + c^3 = z$ and $x$, $y$, $z$ are perfect squares
  • $a + b + c = x^2$, $a^2 + b^2 + c^2 = y^2$, $a^3 + b^3 + c^3 = z^2$ and nothing more on $x$, $y$, $z$
slelievre gravatar imageslelievre ( 2020-09-13 03:43:41 +0100 )edit

Is this homework? Is this from Project Euler?

What have you tried? What specific problem(s) are you facing?

slelievre gravatar imageslelievre ( 2020-09-13 03:45:22 +0100 )edit

It is not for homework, I am doing research and I am just trying to find small numerical solutions without using elliptic curves.

I do mean that $a+b+c$, $a^2+b^2+c^2$, and $a^3+b^3+c^3$ are simply perfect squares, not perfect fourths.

And i have been trying to define each as a separate equation but I cant solve for the variables within a range as integers, something like:

for a in range(5000) for b in range(5000) for c in range(5000)

eq1 = a+b+c==x^2 eq2 = a^2+b^2+c^2==y^2 eq3 = a^3+b^3+c^3==z^2

solve([eq1,eq2,eq3],a,b,c,x,y,z)

I know this is not right, I am super new to Sage, please help!

brennan gravatar imagebrennan ( 2020-09-13 09:01:45 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-09-13 10:10:24 +0100

vdelecroix gravatar image

Elementary version

sage: for a in srange(1, 5000):
....:   for b in srange(1, a+1):
....:     for c in srange(1, b+1):
....:       if (a+b+c).is_square() and (a^2+b^2+c^2).is_square() and (a^3+b^3+c^3).is_square():
....:         print(a,b,c)

A little bit more elaborate

sage: for abc in srange(1, 10000):
....:   abc = abc*abc
....:   for a in srange((abc + 2)// 3, abc):
....:     for b in srange((abc - a + 1)//2, min(a, abc - a)):
....:       c = abc - a - b
....:       if (a^2+b^2+c^2).is_square() and (a^3+b^3+c^3).is_square():
....:         print(a,b,c)

From which you get the list: (129, 124, 108), (516, 496, 432), (1161, 1116, 972), (2873, 2134, 34), (2064, 1984, 1728), (3225, 3100, 2700), ...

edit flag offensive delete link more

Comments

Thank you so much! It is exactly what I needed!!

brennan gravatar imagebrennan ( 2020-09-13 10:35:18 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2020-09-12 23:00:29 +0100

Seen: 672 times

Last updated: Sep 13 '20