information:highlighting
Generalized variable-length integers

More general is using a mixed radix notation (here written little-endian) like a 0 a 1 a 2 {\displaystyle a_{0}a_{1}a_{2}} for a 0 + a 1 b 1 + a 2 b 1 b 2 {\displaystyle a_{0}+a_{1}b_{1}+a_{2}b_{1}b_{2}}, etc.

This is used in Punycode, one aspect of which is the representation of a sequence of non-negative integers of arbitrary size in the form of a sequence without delimiters, of "digits" from a collection of 36: a–z and 0–9, representing 0–25 and 26–35 respectively. There are also so-called threshold values (t 0, t 1, … {\displaystyle t_{0},t_{1},\ldots }) which are fixed for every position in the number. A digit a i {\displaystyle a_{i}} (in a given position in the number) that is lower than its corresponding threshold value t i {\displaystyle t_{i}} means that it is the most-significant digit, hence in the string this is the end of the number, and the next symbol (if present) is the least-significant digit of the next number.

For example, if the threshold value for the first digit is b (i.e. 1) then a (i.e. 0) marks the end of the number (it has just one digit), so in numbers of more than one digit, first-digit range is only b–9 (i.e. 1–35), therefore the weight b is 35 instead of 36. More generally, if t is the threshold for the n -th digit, it is easy to show that b n + 1 = 36 − t n {\displaystyle b_{n+1}=36-t_{n}}.Suppose the threshold values for the second and third digits are c (i.e. 2), then the second-digit range is a–b (i.e. 0–1) with the second digit being most significant, while the range is c–9 (i.e. 2–35) in the presence of a third digit. Generally, for any n, the weight of the (n + 1)-th digit is the weight of the previous one times (36 − threshold of the n -th digit). So the weight of the second symbol is 36 − t 0 = 35 {\displaystyle 36-t_{0}=35}. And the weight of the third symbol is 35 (36 − t 1) = 35 ⋅ 34 = 1190 {\displaystyle 35(36-t_{1})=35\cdot 34=1190}.

So we have the following sequence of the numbers with at most 3 digits:

a (0), ba (1), ca (2),..., 9 a (35), bb (36), cb (37),..., 9 b (70), bca (71),..., 99 a (1260), bcb (1261),..., 99 b (2450).

Unlike a regular n -based numeral system, there are numbers like 9 b where 9 and b each represent 35; yet the representation is unique because ac and aca are not allowed – the first a would terminate each of these numbers.

The flexibility in choosing threshold values allows optimization for number of digits depending on the frequency of occurrence of numbers of various sizes.

The case with all threshold values equal to 1 corresponds to bijective numeration, where the zeros correspond to separators of numbers with digits which are non-zero.