Presumably $n = |G|$? Let $g_1,g_2,\ldots,g_m$ generate $G$, where $m=d(G)$. For $0 \le i \le m$, let $G_i$ be the subgroup of $G$ generated by $g_1,\ldots,g_i$. Then $G_0 < G_1 < \cdots G_{n-1} < G_m = G$, and the containments must all be proper, since otherwise one of the generators would be redundant. So $|G_{i+1}:G_i| \ge 2$ and hence $|G_i| \ge 2^i$ and $|G| \ge 2^m$. So $m \le \log_2(|G|)$.
Let $\alpha \in {\rm Aut}(G)$. Then there are $n-1$ possibilities for $\alpha(g_1)$. Given $\alpha(g_1),\alpha(g_2),\ldots, \alpha(g_i)$ for some $i<m$,
$\alpha(g_{i+1})$ cannot lie in the subgroup generated by $\alpha(g_1),\alpha(g_2),\ldots, \alpha(g_i)$, which has order at least $2^i$, so there at most $(n-2^i)$ possibilities for $\alpha(g_{i+1})$. Multiplying the numbers of possible $\alpha(g_i)$ together gives the required bound on $|{\rm Aut}(G)|$ (but I don't think you have got the definition of $k$ quite right).