Hash Function for 3 Integers
<p>I have 3 non-negative integers and a number n such that</p>

<pre><code>0 &lt;= a &lt;= n, 0 &lt;= b &lt;= n, and 0 &lt;= c &lt;= n. 
</code></pre>

<p>I need a one-way hash function that maps these 3 integers to one integer (could be any integer, positive or negative). Is there a way to do this, and if so, how? Is there a way so that this this function can be expressed as a simple mathematical expression where the only parameters are a, b, c, and n?</p>

<p><strong><em>Note</em></strong>: I need this function because I was using tuples of 3 integers as keys in a dictionary on python, and with upwards of <code>10^10</code> keys, space is a real issue.</p>