Remember the factorial . We want to store a hash table of all the factorials up to and we want to use a hash function of the form . Which would be a good value for ?
You can consider that the hash table has more than buckets and that we can fit numbers up to in variables.
Tips for those who don't love math:
The reminder of with is equal to . Why?
, , and are prime numbers.