When there are a lot of sample results, it is usually impossible to display them all in the form of pages — they show the first few and last, but either “jump” in the middle is either impossible or you need to manually fill in the number of the desired page.
To solve this problem, I came up with a logarithmic page scale algorithm (in the example, 20 billion conditional results divided into 1 billion pages are used):
online example
Ideal for sites with a fast-growing amount of content, because eliminates the need to control and apply measures so that the page list bar does not exceed reasonable limits.
PS Unfortunately, the algorithm was not documented during creation (it was written on a whim), therefore, by what mathematical principles it works, I myself have a bad idea :)