# For which $N$ is it possible to alter one side of an equilateral triangle of side length $N$ to get another triangle of integer side lengths, …?

This question is "inspired" by the Rupsa and Equilateral Triangle problem from Code Chef's "October Challenge 2015". The deadline of 12 October 2015 has passed.

Given an equilateral triangle having length of each side as an integer $N$. We need to tell if it is possible to transform the triangle keeping two sides fixed and alter the third side such that it still remains a triangle, but the altered side will have its length as an even integer, and the line drawn from the opposite vertex to the mid-point of the altered side is of integral length.

Example: If $N=5$ the answer is yes, while if $N=3$ the answer is no.

• can you please attach a diagram? – user300 Oct 2 '15 at 11:18
• What do you mean by "transform the triangle keeping two sides fixed"? – Babai Oct 2 '15 at 19:03
• That's very obfuscated. but all they are really asking is to create right triangles where the hypotenuse is the original N integer, but the legs can be any no integers. So it's asking which integers can be the largest of a pythagorean triplet. – fleablood Dec 22 '15 at 23:08

## 1 Answer

Sure. The side length must be the biggest of one of Pythagorean triples.