10
$\begingroup$

For a natural number $n$, let $c_b(n)$ denote the number of digit transitions in the representation of $n$ in base $b$. By a digit transition, we mean a pair of successive, unequal digits: for instance, the decimal number 114633366 has 4 transitions, given by 14, 46, 63 and 36, hence $c_{10}(114633366) = 4$.

Are there any known results surrounding the quantity $c_2(n) + c_3(n)$ (or, more generally, sums over different bases)? More specifically, I am trying to prove or disprove the following claim:

“For any $C > 0$, there exists a natural number $n$ such that, for any natural $k$ with $n \leq k \leq 2n$, $c_2(k) + c_3(k) > C$.”

In other words, I want to know whether it is possible to always find a number $n$ such that no number between $n$ and $2n$ has binary and ternary representations that are simultaneously nice (in the sense that they have, between them, fewer than $C$ digit transitions).

As a remark, I believe the numbers with few digit transitions in base $b$ can equivalently be described as the numbers expressible as $\sum e_ib^i$ where $i \geq 0$, $e_i \in \{-1, 0, 1\}$, and only few of the $e_i$ are non-zero.

Edit: As Steven Stadnicki pointed out below, this is not true for general $b$. A similar characterisation probably exists in general and is not too difficult, but I don't know if it helps.

As another remark, for a fixed number $k$ of transitions, when varying the number of digits $n$, the number of numbers with $k$ or fewer transitions is polynomial in $n$ (choose the places where the transitions happen, and the digits). The number of numbers, however, is exponential in $n$, so heuristically, one would expect the sets of numbers with few transitions in base 2 and base 3 respectively to have less and less opportunity to intersect as $n$ gets large; however, I am lacking intuition in the area, so I don't know if there is a way to make this rigorous.

My main field is not number theory, so I would be grateful for any advice of where to look for relevant results, no matter how obvious you think it is!

Update: I have checked the minimal value of $c_2(n) + c_3(n)$ between successive powers of 2. Between $2^i$ and $2^{i + 1}$, it is below 6 for $i \leq 22$. It then stabilises at 7 until $i = 30$ inclusive (except for $i = 25$ where it drops back to 6). It jumps to 9 for $i = 31$.

$\endgroup$
4
  • 2
    $\begingroup$ Nitpickery: I believe your remark is only correct in base 2 and (maybe) 3; consider e.g. $2222221_4$. $\endgroup$ Commented Nov 23, 2020 at 23:18
  • $\begingroup$ @StevenStadnicki This is a good point, thanks! I've edited the text. $\endgroup$
    – Bogdan
    Commented Nov 24, 2020 at 15:12
  • 1
    $\begingroup$ I found it confusing at a first read to see the conjecture stated in the way that you seem to believe is false. I wonder if it might be clearer to state the version that you seem to be believe is true? $\endgroup$
    – LSpice
    Commented Nov 24, 2020 at 15:17
  • 1
    $\begingroup$ @LSpice I have rephrased that! I am still not 100% certain what to believe since I'm not particularly familiar with the area. However, the numerical evidence is swaying me towards the suspicion that the value $c_2(k) + c_3(k)$ minimised over intervals of the form $(n, 2n)$ does, indeed, have a subsequence tending to infinity with $n$, albeit slowly. $\endgroup$
    – Bogdan
    Commented Nov 24, 2020 at 15:41

1 Answer 1

14
$\begingroup$

[Edited because I had misread $c_b(k)$ to be the number of non-zero digits in the base $b$ representation, rather than the number of digit transitions. The argument works for both variants. -T]

The claim is true, and one can in fact argue by purely Archimedean methods (with the only number theoretic input being the irrationality of $\log 2 / \log 3$).

If the claim were false, then there exists $C$ such that for every power of two $n = 2^j$, there exists $2^j \leq k \leq 2^{j+1}$ such that $c_2(k)+c_3(k) \leq C$. In particular, for every $j$ there exists a solution to the exponential Diophantine equation

$$ e_{j,1} (2^{j - a_{j,1}+1}-1) + \dots + e_{j,l} (2^{j - a_{j,l}+1}-1) $$ $$= f_{j,1} (3^{j^* - b_{j,1}+1}-1)/2 + \dots + f_{j,m} (3^{j_* - b_{j,m}+1}-1)/2 \quad (1)$$

with $j^* := \lfloor \frac{\log 2}{\log 3} j \rfloor$, $l+m \leq C$, $$ e_{j,1},\dots,e_{j,l}, f_{j,1},\dots, f_{j,m} = \{-2,-1,0,1,2\},$$ and $$ O(1) = a_{j,1} < \dots < a_{j,l}$$ and $$ O(1) = b_{j,1} < \dots < b_{j,m}$$ integers. (There are some additional constraints like $a_{j,l} \leq j, b_{j,m} \leq j_*$ that we shall simply discard. The $O(1)$ constraints are extremely explicit, for instance it would be safe to take $a_{j,1}, b_{j,1} \in \{-3,-2,-1,0,1,2,3\}$.)

We will show instead that the set of natural numbers $j$ for which there is a solution to (1) obeying the stated constraints in fact has natural density zero, giving the required contradiction (this is a version of the probabilistic method).

We perform the following induction. For any $l',m' \geq 1$, let $P(l',m')$ denote the claim that for any integers $a_1,\dots,a_{l'},b_1,\dots,b_{m'}$, the set of $j$ for which there is a solution to (1) obeying the stated constraints together with the additional constraints $$ l \geq l'; m \geq m'$$ $$ a_{j,i} = a_i \hbox{ for } i=1,\dots,l'$$ $$ b_{j,i} = b_i \hbox{ for } i=1,\dots,m'$$ has natural density zero. If we can prove $P(1,1)$ then we are done by the union bound (since there are only boundedly many choices for $a_{j,1}$ and $b_{j,1}$). On the other hand $P(l',m')$ is vacuously true when $l'+m' > C$. So it will suffice to show that $P(l',m')$ is true whenever $P(l'+1,m'), P(l',m'+1)$ are both true.

Fix $l',m',a_1,\dots,a_{l'},b_1,\dots,b_{m'}$, and let $K$ be a large number to be chosen later. By the induction hypothesis and the union bound, the set of $j$ for which one can find a solution to (1) with the indicated constraints will have density zero if we impose either the additional constraint $$ a_{j,l'+1} \leq K$$ or $$ b_{j,m'+1} \leq K$$ (adopting the convention that $a_{j,i}=\infty$ if $i>l$, and $b_{j,i}=\infty$ if $i>m$). Thus we may restrict attention to those solutions which instead obey the constraints $$ a_{j,l'+1}, a_{j,m'+1} > K.$$ The equation (1) and the given constraints (and the convergence of the geometric series $\sum_{n=0}^\infty 2^{-n}, \sum_{n=0}^\infty 3^{-n}$) then implies (for large $j$) that $$ (1 + O(2^{-K})) (e_{j,1} 2^{j - a_{1}+1} + \dots + e_{j,l'} 2^{j - a_{l'}+1})$$ $$= (1 + O(3^{-K})) (f_{j,1} 3^{j^* - b_{1}+1} + \dots + f_{j,m'} 3^{j_* - b_{m'}+1})/2$$ which on taking logarithms and rearranging implies that $$ \frac{\log 2}{\log 3} j = j_* + \frac{1}{\log 3} \log \frac{(f_{j,1} 3^{-b_{1}+1} + \dots + f_{j,m'} 3^{-b_{m'}+1})/2}{e_{j,1} 2^{-a_{1}+1}+\dots+e_{j,l'} 2^{-a_{l'}}} + O( 2^{-K} ),$$ or on taking modulo $1$ to eliminate $j_*$ $$ \frac{\log 2}{\log 3} j = \frac{1}{\log 3} \log \frac{(f_{j,1} 3^{-b_{1}+1} + \dots + f_{j,m'} 3^{-b_{m'}+1})/2}{e_{j,1} 2^{-a_{1}+1}+\dots+e_{j,l'} 2^{-a_{l'}+1}} + O( 2^{-K} ) \hbox{ mod } 1.$$ Thus $\frac{\log 2}{\log 3} j \hbox{ mod } 1$ is constrained to the union of $O(O(1)^{m+m'})$ intervals of length $2^{-K}$. But $\frac{\log 2}{\log 3}$ is irrational, so $\frac{\log 2}{\log 3} j \hbox{ mod } 1$ is equidistributed. Thus the set of solutions to this system of constraints has natural upper density at most $O(O(1)^{m+m'} 2^{-K})$. Since $K$ can be taken arbitrary large, we obtain zero density for the original problem as required.

If one used some quantitative result on the irrationality of $\log 2 / \log 3$, such as that provided by Baker's theorem, one would presumably be able to get some quantitative control on how $C$ must necessarily grow with $n$, but I haven't tried to compute this exactly.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .