← RoseCode

ROSECODE 504

Special Pythagorean Triples

Philippe_57721 · Programming ·

(430,1824,1874) is a special Pythagorean triple.
Indeed, we have:
4302+2133331200=461902
18242+2133331200=462242
18742+2133331200=462262

We call special a Pythagorean triple if there exists a positive integer t such as for each element e of the triple e2+t is a square.

There can exist multiple integers for a given triple.
For instance, the triple (24531,30600,39219) is special with the values 133453264 and 119200745664.

Find all special Pythagorean triples (a,b,c) with a+b+c<2000000
(a triple is counted for each distinct t)

Answer format: Count,t

You are given: 18,17172343737 for a threshold of 10000

[My timing: < 1 min. ]