How did Knuth derive A? When interpreting keys as natural numbers we can use the following formula.

\begin{equation}
h(k) = \lfloor m (kA\bmod{1}) \rfloor
\end{equation}

What I am having trouble understanding is how we choose the value of A where:

\begin{equation}
0 &lt; A &lt; 1
\end{equation}

According to Knuth an optimal value is:

\begin{equation}
A \thickapprox (\sqrt{5} - 1) / 2 = 0.6180339887...
\end{equation}

So my question is how did Knuth come to this and how could I calculate an optimum value for my specific data?
See exercise 9 of section 6.4 of The Art of Computer Programming.

Any irrational $A$ would work, because $\{kA\}$ breaks up a largest gap of $\{A\}, \{2A\}, \ldots, \{(k-1)A\}$ (I use the notation $\{x\}$ for $x\mod 1$).

But if $A = \phi^{-1}$ or $A = \phi^{-2}$, it has a special property: these are the only values for which neither of the two newly created gaps is more than twice as long as the other.