Let me make my code a bit more accurate
7 calculations for 6107
2 calculations for 9431047
287D:{31:1:15:-1:16:16} (31, 1, 0){31:1:17:1:16:20} (31, 1, 1)D_f:{-2:1:11:4:7:17} (-2, 1, 3){-2:1:23:6:17:31} (-2, 1, 4)offset = 2calculations = 4c = 7 * 4112319D:{219:1:109:-1:110:110} (219, 1, 0){219:1:111:1:110:114} (219, 1, 1)D_f:{-2:1:83:12:71:97} (-2, 1, 7){-2:1:111:14:97:127} (-2, 1, 8)offset = 2calculations = 2c = 97 * 12715120D:{236:1:122:2:120:126} (236, 1, 2){236:1:130:4:126:136} (236, 1, 3)D_f:{-9:1:93:13:80:108} (-9, 1, 7){-9:1:123:15:108:140} (-9, 1, 8)offset = 6calculations = 1c = 120 * 126
Need to make my code more precise to work on more families of numbers, but it's working on all of the smaller ones so far.
The algorithm can be summed up as looking at the grid as if we didn't know N or n, that is by pretending the identity (one) doesn't exist - I realized being able to calculate N just from d and e would reveal how to calculate n.