Yeah it wasn't as foolproof but yeah I'll post some output.
(b-a)/2 = (x+n) and (b+a)/2 = (d+n)
So I'm thinking when f = d, we have a = 6k+1.
If f is a square, (x+n) is the square root of f.
If the gcd(f,x+n) = f, then (x+n) is fj where j is a factor of the original (x+n) = (c-1)/2
There is probably other stuff but I'm sleepy