User:Lepecin/sandbox

Introduction
Define the following general set:

$$\mathrm{R}_{n}=\mathbb{Z}\cap[0,n-1]:n \in \mathbb{N}$$

Which is the least residue system modulo n.

The representation of a number x in base n has the following form:

$$x=\sum_{r\in\mathbb{Z}}a_{r}\cdot n^{r}:a_{r}\in \mathrm{R}_n \forall r\in \mathbb{Z}$$

Define the following indicator function:

$$\mathbb{I}_{n}(x) = \begin{cases} 1 & \text{if }x\in \mathrm{R}_{n}\setminus \{0\} \\ 0 & \text{otherwise} \end{cases}$$

The nth digit function counts the number of non-zero ar coefficients used in the representation of x in base n:

$$\mathcal{D}_n(x)= \mathcal{D}_n\biggl( \sum_{r\in\mathbb{Z}}a_{r}\cdot n^{r} \biggr) = \sum_{r\in\mathbb{Z}}\mathbb{I}_{n}(a_{r})\geq0$$

The number x has a finite decimal representation if:

$$\infty>\mathcal{D}_{10}(x)$$