Alternatingbase
Alternatingbase is a numeral system in which the radix (base) used for each digit position follows a fixed repeating pattern, rather than being the same across all positions. Formally, let b1, b2, ..., bk be integers greater than 1 describing a periodic base pattern of length k. A number is represented by digits d0, d1, ..., dm-1 with 0 ≤ di < b_{i mod k}. The value of the representation is the sum d0 + d1·b1 + d2·(b1·b2) + d3·(b1·b2·b3) + ...; equivalently, each position multiplies the accumulated product of the previous bases.
Conversion between alternatingbase representations and integers is a standard mixed-radix procedure. To encode N, repeatedly divide
Example: using the pattern [2, 3] repeatedly, the digits (d0, d1, d2) with d0 ∈ {0,1}, d1 ∈
Alternatingbase is a special case of a mixed-radix numeral system. If all bases are equal, it reduces