A common solution is to compute a fixed hash function with a very large range (say, 0 to 2 32 − 1), divide the result by n , and use the division's remainder . If n is itself a power of 2, this can be done by bit masking and bit shifting . When this approach is used, the hash function must be chosen so that the result has fairly uniform distribution between 0 and n − 1, for any value of n that may occur in the application. Depending on the function, the remainder may be uniform only for certain values of n , . odd or prime numbers .