This is the esoteric programming item. Post your hash implementations in LISP; 31 is a prime number, after all.
You have several choices: