I made the code basic to express the idea of why changing G+ database is a fast way to scan (it wasn't intended to be fast just forget about it and focus on G, the database, and the range division), if you jump keys you miss the speed of scalar multiplication.
for that reason the random in the current tools is R+incremental (to take advantage of scalar multiplication).
example :
pk=148557384957383058
and your database capacity is 1000000.
changing G to 1000000
you would only have to search
148557384957
while the common is
148557384957383058.
and as I said when posting the script, everything is in the fluidity with which we can scan the database quickly.
This is what is called a Baby-step-Giant-step (BSGS) algorithm. There is many good and optimized implementations of this algorithm, including GPU implementations.
If you generate sequence of 10 successive keys, you can check every 10th key in range to hit some key in sequence, 100 keys - every 100th and so on.
But to achieve this you don't need to change G at all.