I've been trying for a while to show the proposition in the title of this post, but I find difficulties in the last step of the proof. I kindly ask an advice on how to go further. Meanwhile I show where I arrived.
I will use two partial results of which I omit the proof in order to make reading easier:
Lemma 1: $\forall m,n \in \mathbb{N}$, such that $m\geq n$, $\exists ! q \in \mathbb{N}$ and $ \exists ! r \in \mathbb{N} \cup \{0\}$ that verify $m=qn+r,r<n $. Lemma 2: given $q \in \mathbb{R}$, $q>1$, then $\forall x \in (0,1) \subset \mathbb{R}$, $\exists ! k \in \mathbb{N}$ such that $xq^{k-1}<1\leq xq^{k}$.
Now the proof:
I will consider the case $x=\frac{m}{n}<1$ with $m,n \in \mathbb{N}$ because after proved this, the other cases are trivial.
$ x=\frac{m}{n}<1\underbrace{\Rightarrow }_{\text{Lemma 2}}x=q^{-k_1}\underbrace{\frac{mq^{k_1}}{n}}_{\geq 1}\underbrace{=}_{\text{Lemma 1}} q^{-k_1}\left ( q_1+\underbrace{\frac{r_1}{n}}_{<1} \right ) \underbrace{=}_{\text{Lemma 2}} $ $=q^{-k_1}q_1+q^{-(k_1+k_2)}\underbrace{\frac{q^{k_2}r_1}{n}}_{\geq 1}\underbrace{=}_{\text{Lemma 1}}q^{-k_1}q_1+q^{-(k_1+k_2)}\left ( q_2+\underbrace{\frac{r_2}{n}}_{<1} \right ) \underbrace{=}_{\text{Lemma 2}}...= $ $ =\sum_{i=1}^{N}q_iq^{-(k_1+...+k_i)}+\frac{r_N}{n}q^{-(k_1+...+k_N)} =...$
with $q_1,... \in \mathbb{N}$, $r_1,... \in \mathbb{N} \cup \{0\}$ and $k_1,... \in \mathbb{N}$.
Two cases may arise: $\exists N \in \mathbb{N} : r_N=0$, and then the sequence of digits $ \{q_k\} $ obtained has the form $q_1,q_2,...,q_{N-1},0,...,0,...$, or $\forall N \in \mathbb{N} \ r_N \ne 0 \Rightarrow$ since $0 \leq r_N < n$ then $\exists i,j \in \mathbb{N}$ such that
$r_i=r_{i-j}\Rightarrow k_i=k_{i-j}\Rightarrow \left\{\begin{matrix} q_{i+1}=q_{i-j+1}\\ r_{i+1}=r_{i-j+1} \end{matrix}\right.\Rightarrow k_{i+1}=k_{i-j+1} \Rightarrow \left\{\begin{matrix} q_{i+2}=q_{i-j+2}\\ r_{i+2}=r_{i-j+2} \end{matrix}\right.\Rightarrow ...\Rightarrow \left\{\begin{matrix} q_{i+(j-1)}=q_{i-1}\\ r_{i+(j-1)}=r_{i-1} \end{matrix}\right.\Rightarrow k_{i+(j-1)}=k_{i-1}\Rightarrow \left\{\begin{matrix} q_{i+j}=q_{i}\\ r_{i+j}=r_{i}=r_{i-j} \end{matrix}\right. $
in other words, quotients and remains are repeated in groups of $i-j$ digits $\Rightarrow$ the sequence $\{q_k\}$ is periodic from a suitable index onwards.
Also note that in both cases the exponents $k_i$ are chosen such that (Lemma 2):
$ \frac{r_{i-1}q^{k_i-1}}{n}<1\leq \frac{r_{i-1}q^{k_i}}{n}=q_i+\frac{r_i}{n} $
from which $q_i<q$.
It remains to show that the sequence of digits $\{q_k\}$ so constructed is effectively the q-ary expansion of $x$. The only case in which it is not, occurs when the expression of $x$ consists of an unlimited number of digits (second case) and also takes the form:
$ x=\sum_{i=1}^{M}q_iq^{-(k_1+...+k_i)}+\sum_{i=1}^{\infty}\left \lceil q-1 \right \rceil q^{-(k_1+...+k_M+i)} $
for a suitable $M \in \mathbb{N}$ (the square brackets in the expression indicate the upper integer part).
To conclude the proof I have to show that these particular numbers have periodic expansion in base $q$. Here I am stuck because the only thing I can get is that these numbers are:
$ x=\sum_{i=1}^{M}q_iq^{-(k_1+...+k_i)}+\frac{\left \lceil q-1 \right \rceil}{q-1}q^{-(k_1+...+k_i)+1} $
and since $\left \lceil q-1 \right \rceil=(q-1)+(1-\{q\}) $ (braces = fractional part), I would have finished if I could state that $\frac{1-\{q \} }{q-1} $ has a periodic expansion in base $q$, but I can't :(
Any advice?
Thanks in advance.
If $q = \sqrt{x}$ then $x = q^2$ so the representation of $x$ in base $q$ is $100.$