A maximum principle for the mutation-selection equilibrium of nucleotide sequences