# Does this sequence have a limit?

Digit sums of numbers $3^m$ in base $10$ for $m=1,2,...,50$ are:

$3,9,9,9,9,18,18,18,27,27,27,18,27,45,36,27,27,45,36,45,27,45,54,54,63,63,81,72,72,63,81,63,72,99,81,81,90,90,81,90,99,90,108,90,99,108,126,117,108,144$.

Ratios $\dfrac {ds_{10}(3^m)}{ds_{10}(3^{m+1})}$ for $m=1,2,...,49$ to three decimal places are:

$0.333,1.000,1.000,1.000,0.500,1.000,1.000,0.666,1.000,1.000,1.500,0.666,0.600,1.250,1.333,1.000,0.600,1.250,0.800,1.666,0.600,0.833,1.000,0.857,1.000,0.777,1.125,1.000,1.142,0.777,1.285,0.875,0.727,1.222,1.000,0.900,1.000,1.111,0.900,0.909,1.100,0.833,1.200,0.909,0.916,0.857,1.076,1.083,0.750$

Does there exist limit of the sequence $a(m)=\dfrac {ds_{10}(3^m)}{ds_{10}(3^{m+1})}$?

I cannot resist to note some kind of chebyshevness of this question (if there is one) because we know that Chebyshev proved that if limit in the prime number theorem exists then it must be equal to $1$. It could be that this is also the case here.

I also welcome any computational effort and results obtained from such an experimental work if the proof is out of reach.

• Could you explain what $ds_{10}$ notates? Sep 21 '17 at 13:24
• @ChaseRyanTaylor it is digit sum of a number in base 10. For example $ds_{10}(12999)=1+2+9+9+9=30$
– user480281
Sep 21 '17 at 13:25
• This doesn't help much, but I was able to program it in python and make a nice figure. The code is here gist.github.com/anonymous/2a5080094d7deb396bedc330a0656d76 and the figure I generated is here imgur.com/a/GQvqp. It looks like it is converging to something, but you'd have to probably establish some lower and upper bounds on the function. Sep 21 '17 at 13:39
• My guess: The limit is $1$, independent of the base. The fraction is identically $1$ in base $3$. Sep 21 '17 at 13:41
• Assuming that the digits of $3^m$ are uniformly distributed, the digit sum would be approximately proportional to $\log_{10} 3^m = m \log_{10}3$. Hence your limit would reduce to $\lim_{m\to \infty} \frac {K m}{K(m+1)}$ for some roughly constant value $K$. So it certainly makes sense that the limit should be 1. Sep 21 '17 at 17:38

Just for the fun of it.

I computed $r_k$ for $m=10^k$ and got the following results $$\left( \begin{array}{cc} k & r_k & \approx \\ 1 & 1 & 1.000000000 \\ 2 & \frac{17}{23} & 0.739130435 \\ 3 & \frac{119}{118} & 1.008474576 \\ 4 & \frac{2407}{2363} & 1.018620398 \\ 5 & \frac{23786}{23853} & 0.997191129 \\ 6 & \frac{238501}{238943} & 0.998150186 \\ 7 & \frac{1192772}{1192319} & 1.000379932 \\ 8 & \frac{23856784}{23858211} & 0.999940188 \end{array} \right)$$ My computer gave up for $k=9$.

• Sure looks like convergence to $1$. Why not write the ratios as decimal fraction, maybe show difference from $1$ in scientific notation. That would suggest a rate of convergence. Sep 21 '17 at 14:25
• @Antoine. You are welcome ! Sep 21 '17 at 14:25
• If you want to, you can calculate $8$ more tables or $8$ more results and put it in one table (if possible), those $8$ tables being tables for $m=w^k$ for $w=2,3,4,5,6,7,8,9$ and $k=1,2,3,4,5,6,7,8$. That would enrich us probably with more insight.
– user480281
Sep 21 '17 at 14:42
• looks like a $1+O(m^{- \frac 12})$, like randomly generated numbers of the same size would behave. Sep 21 '17 at 14:59
• @mercio Yet we know that they are not at all random. I do not know why they exhibit such tendency toward randomness.
– user480281
Sep 21 '17 at 15:03

So I programmed the different plots for base 3-10 for 1000 points, and for almost all of them you can see that it basically converges to 1, but in base 9 it has extremely weird behavior. This may be due to my programming, but it does seem to suggest that in base 9 it doesn't converge to 1.

The plots can be seen here: https://imgur.com/a/QvNlA.

The code can be seen here: https://gist.github.com/anonymous/a4888cc09178dc8a967596e085dbd165

EDIT:

So I have an idea that it seems to do this oscillation when the basis is some power of the sequence number. So for example, if we consider the sequence $\frac{ds_{4}(2^m)}{ds_{4}(2^{m+1})}$ (here the base is $2^2$), we see the oscillation, and for the sequence $\frac{ds_{8}(2^m)}{ds_{8}(2^{m+1})}$ (here the base is $2^3$), we can see the oscillation again. Below are the sequences respectively:

EDIT 2: We can in fact show this oscillation. Notice that we can rewrite $3^m = a_0 + a_1 3^j + a_2 3^{2j} + \cdots + a_n 3^{nj}$. We can then rewrite our $ds_{3^j}$ function to be $ds_{3^j}(3^m) = \sum_{i=0}^n a_i$.

So let's think about the case for $3^2$, or base 9. Let $\mu(x) = ds_{3^2}(x)$ for notational simplicity. Then we will go through some examples. We have then $3^1 = 3$ base 9, so $\mu(3) = 3$. Then $3^2 = 1 * 3^2$, so we have $\mu(9) = 1$. Notice $3^3 = 3 * 3^2$, and so $\mu(27) = 3$. So now we start to generalize. If $m$ is even, then we have that $\mu(3^m) = 1$, and if $m$ is odd then we have $\mu(3^m) = 3$. This is pretty clear to see (notice that if it's even then we have that then we have $(3^2)^k$ and so we have $a_k = 1$ and $a_0, \ldots, a_{k-1} = 0$, and if its odd then we have it's of the form $3 * (3^2)^k$ and so we have $a_k = 3$ and $a_0, \ldots, a_{k-1} = 0$) but it gives us this nice oscillation between $1/3$ and $3$, since if $\mu(3^m)$ is even then we have $\mu(3^{m+1})$ is odd and vice versa. We can in fact show that this will hold for any power, and that if we have $3^{n+1}$ as our base then our number will remain at $1/3$ for $n$ steps before shifting to $3^n$. This is something that we see in the case of the series $2^m$ in base 8; notice that in the second graph I posted it seems to linger at $1/2$ for two steps before shifting up to $4$.

Moreover, we can notice that if our base is of the form $3^j$ for $j >1$, then in fact your sequence does not converge.

EDIT 3: Asking a friend, he says that it is impossible for this to converge to 1 in any base since there will always be jumps down to 0. I don't have a formal proof for this, but this makes sense.

• In case it isn't clear, the reason 9 looks so dense is because there is oscillation between 3 and 1/3. If you do run the program, you can use plt.show() instead of saving it so that you can zoom in and see this. Sep 21 '17 at 15:57
• +1 for your effort. You really took the time to study this.
– user480281
Sep 21 '17 at 16:01
• @Antoine You have to zoom in to really see it, but it oscillates between 3 and 1/3. I zoomed in for this picture: imgur.com/a/wtziK Sep 21 '17 at 16:28
• @Antoine Check out the edit. It seems to have to do with the fact that the base is a power of 3. Sep 21 '17 at 16:40
• Yes, it must have to do with that and it has to do with that.
– user480281
Sep 21 '17 at 16:43