Project Euler #94: Almost equilateral triangles

Sort by

recency

|

10 Discussions

|

  • + 0 comments

    Wow, with the right algorithm, 10**18 finishes instantaneously...

  • + 0 comments

    Hints:

    1. Only 30 triangles are possible with perimeter 10^18.
    2. The 2 equal sides for the first 3 triangles are 5, 17, 65.
    3. On how to generate the remaining sides, check A195531
    4. The perimeter can be calculated either by 3a+1 or 3a-1
  • + 0 comments

    Use Pell's equation from the problem #66! Sould be simple.

  • + 0 comments

    you can find my java solution here

  • + 0 comments

    Pythagorean triples with up to is a bit insane. I could manage . Still looking for a way out.

    EDIT: You may try to list some of the valid , , and its perimeter to look for a pattern. Don't look further if you don't want to spoil the fun.

    The sum of two consecutive perimeters is very close to the isosceles side of the next triangle. Experiment with it.

    EDIT 2: You may also take a look at Tree of primitive Pythagorean triples. The parent-child relationship is especially useful here. If you don't know how Pythagorean triples can be used for this problem, look up Isosceles Heronian triangles.

    Yet another approach I've seen from others is to solve Pell's equation.