Ok but how you image to work with bigger size of range, the nearest 2**130…? How much ram do you need to generate such equation ?
I don't image to work with bigger size of range.
At this level the problem in my opinion is to shrink the size of database. That's all.
To "cover" a 2**130 space, you need 2**65 keys with distance 2**65.
2**65 keys with 128 bit (at least) means 2**73 bit = 2**70 bytes, 1 Billions of TB.
If you use the script of the OP, 2**65 keys = 2**65 bits = 2**62 bytes = 4 Millions of TB.
These are the numbers.
These script are made for fun, not to become rich.