Since the two polite triangle bases come from f, it should scale upwards with increasing c values.
All we have to do is check each iteration to see if it's a perfect square.
This is the two equations merging together or running alongside each other. (i think)
Equation 1 is: SQRT(c + (x+n)^2) - d = n
Equation 2 is: f factor * iteration + 1 = a perfect square? If not, don't run it through equation 1.