On the lexicographic representation of numbers