Efficient m-ary balanced codes which are invariant under symbol permutation