I found a link between the 2(x+n)2(x+n) square and the cell in (1,1) where d is equal to the n value from (0,n)'s a=aa b=bb cell. The polite triangle bases from 2(x+n)2(x+n) add together to give the x value in the (1,1) cell. I think you can link it back to the original (x+n)(x+n) with algebra. Once I figure that out I'll post more. This "analyze everything at once" program has already proven to be very useful.
By the way, if anyone's planning on using my program >>8480 here, you'll want to change the subtraction on lines 553, 554, 581 and 582 to an addition (whoops).