Hash function algorithm, modular arithmetic and Horner's method

I was reading Robert Sedgewick's book, in the Chapter 16 Hashing, the author says that using Horner's method and according to mod function's arithmetic properties, we can compute hash function for a big integer without overflow.

Here is the number and the function

Introduction to hash function

Consider this situation: there is an array of objects, each object has a unique identifier, also called key. The most common way to access the array is to find the object which's key equals the given key.

If the objects are randomly stored in the array, you have to scan the whole array and compare each object's key to the given parameter. If the array is sorted by the key, you can use binary search to located the object, it takes O(lgN) time.

If the objects are randomly stored in the array, you have to scan the whole array and compare each object's key to the .