Given two triangles with the same perimeter. Both triangles have integer side lengths. The first triangle is an equilateral triangle. The second triangle has a side with length 1 and a side with length $d$. Prove that when $d$ is divided by 3, the remainder is 1.
Notice that the third side of the second triangle must be $d$ to satisfy the triangle inequality. Since the perimeter of the equilateral triangle must have been a multiple of $3$, we must have $$2d+1\equiv 0 \pmod 3 \Rightarrow d\equiv 1 \pmod 3.$$