Project Euler #138: Special isosceles triangles