>>5581
So firstly we need to think about what x and n could possibly equal for (x+n) to be odd. n will only ever be 0 if c is a square (i.e. n = ((a+b)/2)-d = ((4+4)/2)-4 = 0). If that’s the case, x = 0 too (i.e. x = d-a = 4-4 = 0). So if (x+n) is odd, the lowest possible n value will be 1. In the case of (x+n) = 1 (the first picture), that means the only possible way to make (x+n) is with n=1 and x=0. For every other (x+n) value, e.g. (x+n)=5, there are more possibilities. (x+n)=5 when x=0 and n=5, x=1 and n=4, x=2 and n=3, x=3 and n=2, and x=4 and n=1. So if we were to try to find mathematical patterns, we would have to do so for every different possible combination of x and n values, right?
Well, as you’ll see in the pictures for every (x+n) above 1, there are a finite number of cells for which n=/=1, followed by an infinite set of cells for which n=1. I’m going to focus on the infinite sets for now in my explanation.
The main points of comparison are f, d and (n-1), as VQC said. Within the infinite sets where n=1, f will always equal (x+n)^2 and (n-1) will equal 0. This will be true for all odd values of (x+n) where n=1 (which is an infinite set). In the case of nn+2d(n-1)+f-1, the value of d is irrelevant, because 2d(1-1) is 0. Also, nn-1 will be 0. That means, for the infinite set for which (x+n) equals an odd number and n=1 (which will begin after a certain increment of a and b), (x+n)(x+n) = f. That means we can very easily calculate x and n, since, if f=(x+n)(x+n) and n=1, x will be sqrt(f)-1. This is true for an infinite set of numbers. Either I’m somehow wrong (I don’t see how I could be) or this has been staring us in the face the whole time.
Now, the obvious flaw in this finding is that it doesn’t represent the values of (x+n) where n=/=1. For each odd (x+n), this is a finite set, so we should be able to play around with them and find a pattern. It does look very noisy though (if you look at f in the first several outputs for 3, 5, 7 and 9, you'll see it doesn't seem very obvious how to straight calculate it). I only just put this all together, so I haven't messed with it myself. Could anyone double check my working? Because it seems too easy for (x+n)(x+n) to equal f for the vast majority of cases for it to be entirely true or useful.