1

Slightly inspired by this question:

I have noticed that in the representation of powers of $9$ on base $10$, each digit repeats periodically as a function of the exponent.

I assume that the same behavior can be observed in the representation of powers of $k$ on base $k+1$, but for the sake of simplicity, I will focus on the specific case of $k=9$.


A few examples:

  1. The period of the $1$st digit is $2$:

    • $n\equiv0\pmod{2}\implies9^n\equiv1\pmod{10}$
    • $n\equiv1\pmod{2}\implies9^n\equiv9\pmod{10}$
  2. The period of the $2$nd digit is $10$:

    • $n\equiv0\pmod{10}\implies\lfloor\frac{9^n}{10}\rfloor\equiv0\pmod{10}$
    • $n\equiv1\pmod{10}\implies\lfloor\frac{9^n}{10}\rfloor\equiv0\pmod{10}$
    • $n\equiv2\pmod{10}\implies\lfloor\frac{9^n}{10}\rfloor\equiv8\pmod{10}$
    • $n\equiv3\pmod{10}\implies\lfloor\frac{9^n}{10}\rfloor\equiv2\pmod{10}$
    • $n\equiv4\pmod{10}\implies\lfloor\frac{9^n}{10}\rfloor\equiv6\pmod{10}$
    • $n\equiv5\pmod{10}\implies\lfloor\frac{9^n}{10}\rfloor\equiv4\pmod{10}$
    • $n\equiv6\pmod{10}\implies\lfloor\frac{9^n}{10}\rfloor\equiv4\pmod{10}$
    • $n\equiv7\pmod{10}\implies\lfloor\frac{9^n}{10}\rfloor\equiv6\pmod{10}$
    • $n\equiv8\pmod{10}\implies\lfloor\frac{9^n}{10}\rfloor\equiv2\pmod{10}$
    • $n\equiv9\pmod{10}\implies\lfloor\frac{9^n}{10}\rfloor\equiv8\pmod{10}$
  3. The period of the $3$rd digit is $50$...

  4. The period of the $4$th digit is $250$...


Let $Dm_n=\lfloor\frac{9^n}{10^m}\rfloor\bmod{10}$ denote the $m$th digit of $9^n$.

Let $p(m)=2\cdot5^m$ denote the period of the sequence $Dm$.

Please note that I am using $m$ as a $0$-based index in the above notations.

Is there any efficient way to determine the values of $Dm_0,\dots,Dm_{p(m)-1}$?

If there is one, then I believe that it will allow us to easily compute the middle digit of $9^{50000}$, thus essentially answer the inspiring question linked above.

Thanks

barak manos
  • 43,109
  • Not sure about the appropriate tags for this question, so feel free to add some more if you have any... – barak manos Feb 17 '15 at 17:09
  • I would think that the periods are easier to compute if you think about it as modulo $10^k$, rather than just "the $k$-th digit from the right". – Arthur Feb 17 '15 at 17:25
  • @Arthur: Modulo $10^k$ would give me a number (and possibly a rather large one), whereas I'm interested in an efficient way to predict a certain digit in any arbitrary power of $9$. – barak manos Feb 17 '15 at 17:31
  • And there is no way of doing that without taking the less significant digits into account. The lesser digits matter, and therefore it's impossible to calculate if you've thrown them away. The comments in the linked question also point out that digits in the middle of the number are hard to compute, and this is why. – Arthur Feb 17 '15 at 17:36
  • @Arthur: So let's take for example the second digit, which repeats as $0,0,8,2,6,4,4,6,2,8$ - are you saying that there is no way to calculate it (assuming that you don't already know it of course) based on the exponent modulo the period-length (in this case, modulo $10$)? – barak manos Feb 17 '15 at 17:40
  • There is no way to calculate that sequence without taking into account that after the first $0$ there's a $1$ that you've cut off, after the second $0$ there is a $9$, after the first $8$ comes a $1$, after the first $2$ comes a $1$. Not that I'm aware of, at least. – Arthur Feb 17 '15 at 17:48
  • @Arthur: OK, thank you for the insights. – barak manos Feb 17 '15 at 18:20

0 Answers0