# Question:Perimeter and area of a triangle are integer numbers

## Question:Perimeter and area of a triangle are integer numbers

Maple

In geom3d. I want to find the vertices A(x1,y1,z1), B(x2,y2,z2), where x1, y1, z1, x2, y2, z2 are integer numbers so that the triangle OAB  (O is origin) and perimeter and area are integer numbers. I tried

> resrart:

N:=5:

L:=[]:

for x1 from -N to N do

for y1 from x1 to N do

for z1 from y1 to N do

for x2 from -N to N do

for y2 from -N to N do

for z2 from -N to N do

a:=sqrt(x1^2+y1^2+z1^2):b:=sqrt(x2^2+y2^2+z2^2):c:=sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2):

p:=(a+b+c)/2:

S:=sqrt(p*(p-a)*(p-b)*(p-c)):

if type(2*p, integer) and type(S, posint)

then L:=[op(L), [[0, 0, 0], [x1, y1, z1], [x2, y2, z2]]]: fi:

od: od: od: od: od: od:

nops(L);

But my computer runs too long. I can not receive the result. How to get the answer?

If I the length of the side are 6, 25, 29. I tried

DirectSearch:-SolveEquations([(x2-x1)^2+(y2-y1)^2+(z2-z1)^2 = 6^2, (x3-x2)^2+(y3-y2)^2+(z3-z2)^2 = 25^2,  (x3-x1)^2+(y3-y1)^2+(z3-z1)^2 = 29^2], {abs(x1) <= 30, abs(x2) <= 20, abs(x3) <= 20, abs(y1) <= 20, abs(y2) <= 20, abs(y3) <= 20, abs(z1) <= 20,abs(z2) <= 20, abs(z3) <= 20}, assume = integer, AllSolutions, solutions = 1);

﻿