3D, These graphics are excellent!
GA, happy to share the code/concepts for creating the triangle/squares. Actually had some fun putting that piece together. A lot of the code is dependent on other parts, so a bit difficult to break up and post in it's entirety.
Very excited about where this is going!
>When moving up and down, keep d constant. Two factors, three factors, four.
Have been working on this hint from a little while ago.
Ran into a few problems trying to find factor records of c in the original grid data, and the n,d,f querying code turned out to be a little too slow.
So this exercise turned into trying to figure out a way to iterate n and find matching records.
Well, it appears that you can't just "iterate" n. (Or at least I can't.)
For any x+n, there are many combinations of n,d,f that satisfy the nn+2d(n-1)+f-1 = XPN equation.
Simply incrementing n just tells you if it fits within a specified XPN.
Therefore, you need to increment BOTH sides of the equation.
Pics attached are samples of this two sided iteration process for test cases c147, c155, c1143, c1155, and c6107. And I believe it finds the appropriate factors properly.
Performance for this process is roughly 2 calculations for each odd x+n, and matching records are still determined based on the remainder 2d(n-1) formula being zero.