(Travail en commun avec L. Habsieger, S. Laishram and B. Landreau)
How close can s2(n) and s3(n) be?
Here, sb(n) denotes the sum of the digits of the representation
of the integer n in an integral basis b ≥ 2. I was faced to this
question a few years ago when I. Ruzsa and I noticed that if the representation of n!
in base 12 ends with ...1000...000, then s3(n) - s2(n)
belongs to {0, 1}.
Numerical evidence shows that integers n such that
s3(n) = s2(n)
are rather frequent: this is the case of more than 4% of the integers up to 1012.
A heuristic model shows that sb(n) may be considered as the value of a random
variable with expectation (b-1)/(2 log b) log n and dispersion O(log n),
and it can be proved along those lines that there exists a sequence 𝒜 of density 1 such that one has
lima ∈ 𝒜, a → ∞
(s3(a)-s2(a))/log a = (1/log 3 - 1/log 4) = 1.8889...
We shall prove that when N is large enough one has
Card {n ≤ N : |s3(n)-s2(n)|/log n ≤ 0.1458}
> N0.97.
The proof is elementary with a probabilistic flavour and considers only the separate distributions of the
sequences (s2(n))n and (s3(n))n.