<imgclass="img-responsive center-block"alt="points A, B, C, D and P creating three triangles: ABP, CDP, and BDP"src="https://cdn.freecodecamp.org/curriculum/project-euler/three-similar-triangles.gif"style="background-color: white; padding: 10px;">
So, given that $a = c$, we are looking for triplets ($a$, $b$, $d$) such that at least one point $P$ (with integer coordinates) exists on $AC$, making the three triangles $ABP$, $CDP$ and $BDP$ all similar.
For example, if $(a, b, d) = (2, 3, 4)$, it can be easily verified that point $P(1, 1)$ satisfies the above condition. Note that the triplets (2,3,4) and (2,4,3) are considered as distinct, although point $P(1, 1)$ is common for both.
If $b + d < 100$, there are 92 distinct triplets ($a$, $b$, $d$) such that point $P$ exists.
If $b + d < 100\\,000$, there are 320471 distinct triplets ($a$, $b$, $d$) such that point $P$ exists.
If $b + d < 100\\,000\\,000$, how many distinct triplets ($a$, $b$, $d$) are there such that point $P$ exists?