Nice work!
Here's my working idea for order of operations.
Start at c (of course!)
Create (1,c)
Create na transform records for (e,1) and (-f,1)
Then begin expanding outward from the na transform records.
We already have a starting t value from the na transforms
We know an and a(n-1) have a lower t value
We know bn and b(n-1) have a larger t value
We also know that at the correct t values, we can move from an to bn, and they are [t+n] elements apart
We also know that at the correct t value, a(n-1) and b(n-1) are [t+n-1] elements apart
So we “iterate” (not really, because we’re moving by multiples and factors), looking for the 4 elements that match and give us our an, bn, a(n-1), and b(n-1) values.
It’s definitely an o(log t) way to search
Thoughts, Anons?