Does mapping a large character-set hash onto a small character-set hash lower entropy for a fixed size substring?
I'm writing a python app that involves generating passwords for websites. During the application I want to convert hexidecimal hashes to alphanumeric strings, and take the first twenty characters of the output. I want to convert to alphanumeric, because most websites at least support the upper-lower alphanumeric character set.
I surjectively map the larger character set of hexadecimal bytes $\{00...\text{ff}\}$ onto the smaller set of upper and lowercase alphanumerics $\{a...z, A...Z, 0...9\}$.
The mapping is done by recycling the 62 alphanumeric elements cyclically to correspond to each element of the 256 bytes
$$00 \rightarrow a$$ $$01 \rightarrow b$$ $$\vdots$$ $$0e \rightarrow 9$$ $$0f \rightarrow a$$ $$\vdots$$
For example, if the world's most secure password - "password" - is sha512 digested as hexadecimal it is unsurprisingly - $128 \times log_2(16) = 512$ bits.
$$ \text{b109f3bbbc244eb82441917ed06d618}\\ \text{b9008dd09b3befd1b5e07394c706a8b}\\ \text{b980b1d7785e5976ec049b46df5f1326}\\ \text{af5a2ea6d103fd07c95385ffab0cacbc}\\ 86\\ $$
Since each pair of hex-digits is mapped onto one alphanumeric digit, I assume the entropy of the resultant alphanumeric string is $64 \times log_2(62) = 382.5459$ bits.
$$\text{1j5bcKq8KdvcwVJpuiJj3efBGh5oYSp}\\\text{9 e1D6GB4YeFiLHtMZCUQxdfhpvjhVmWck}\\$$
The new string has half the length but ~75% of the entropy of the original string, so there is more per-character entropy in the alphanumeric projection, making
$$\text{1j5bcKq8Kd}$$
a better password than
$$\text{b109f3bbbc}$$
Have I made any invalid assumptions, or done the math incorrectly? Any insights into whether or not this surjective mapping is a good idea would be appreciated. If any clarification or edits are needed I'd be happy to make them - please leave a comment below.