Numbers in Decimal Expansions

Let $p = p_1 p_2 p_3 \cdots$ be an infinite sequence of random digits, selected from $\{0,1,2,3,4,5,6,7,8,9\}$ with equal probability.
It can be seen that $p$ corresponds to the real number $0.p_1 p_2 p_3 \cdots$
It can also be seen that choosing a random real number from the interval $[0,1)$ is equivalent to choosing an infinite sequence of random digits selected from $\{0,1,2,3,4,5,6,7,8,9\}$ with equal probability.
For any positive integer $n$ with $d$ decimal digits, let $k$ be the smallest index such that $p_k, p_{k + 1}, \dots, p_{k + d – 1}$ are the decimal digits of $n$, in the same order.
Also, let $g(n)$ be the expected value of $k$; it can be proven that $g(n)$ is always finite and, interestingly, always an integer number.
For example, if $n = 535$, then
for $p = 31415926\mathbf{535}897\cdots$, we get $k = 9$
for $p = 35528714365004956000049084876408468\mathbf{535}4\cdots$, we get $k = 36$
etc and we find that $g(535) = 1008$.
Given that $\displaystyle\sum_{n = 2}^{999} g \left(\left\lfloor\frac{10^6} n \right\rfloor\right) = 27280188$, find $\displaystyle\sum_{n = 2}^{999999} g \left(\left\lfloor\frac{10^{16}} n \right\rfloor\right)$.
Note: $\lfloor x \rfloor$ represents the floor function.

This problem actually involves implementing some statistics, number theory, and programming together. Let’s go step by step.

For an n-digit number, we have `10^n` total possibilities. Now, we’re selecting infinite digit number at random, so the probability that some sequence with n digits is selected is `1/10^n`. This is similar to a geometric distribution, so the expected value, g(n), is `10^n`.

For the current problem we observe that `\lfloor10^16/n\rfloor` and `n` decrease in the same rate approximately as `n` increases. Meanwhile, `10^16/n` is approximately the same scale as n. Therefore, `10^16/n` is an d-digit number if `10^(d-1)<=n<10^d` holds. We also know that g(n) is `10^n` which is `10^d`, as d-digit number, if `n` is a d-digit number. So, to sum up from 2 to 999999, `\sum_{n=2}^{999999}g(\lfloor10^16/n\rfloor)` we consider different segments from `10^(d-1)` to `10^d` for `d` from 1 to 6. This sum can be calculated by the following pseudo code: ```code answer = 0 for i in range(1,7): a = pow(10,i-1) b = pow(10,i) answer += a*(min(b, 1000000) - max(a,2) + 1) print(answer) ``` Here `min(b, 1000000)` and `max(a,2)` account for the fact that our sum range is from 2 to 999999 but each segment goes up to `10^d`. By running this code, you will find that the sum is `21295121502550`. So `\sum_{n = 2}^{999999} g \left(\left\lfloor\frac{10^{16}} n \right\rfloor\right) = 21295121502550` is the solution to the problem. Keep in mind that the mathematical understanding behind this involves knowledge of Geometric Distribution in statistics, mathematics involved with orders of magnitude, infinite series, and number theory. Also, keep in mind that the expected value, in this case, is derived based on the probabilistic behavior of infinite random experiments, which is an assumption in our case.

More Answers:
Sliding Game
The Mouse on the Moon
Digital Root Clocks

Error 403 The request cannot be completed because you have exceeded your quota. : quotaExceeded

Share:

Recent Posts

Don't Miss Out! Sign Up Now!

Sign up now to get started for free!