6
$\begingroup$

First, how I arrived at a number having the property that the first $250$ digits after the decimal point contain $7777$ , $8888$ and $9999$

I wanted to construct a number which can be shown to be transcendental using the irrationality measure

http://mathworld.wolfram.com/IrrationalityMeasure.html

Consider the sequence $$a_1=0\ ,\ a_2=1\ ,\ a_n=a_{n-1}^2+a_{n-2}\ for \ n>2$$

Then, the denominators of the convergents of the simple continued fraction $$x:=[a_1,a_2,a_3,\cdots]$$ satisfy $q_n=a_{n+1}$ (which can be shown by induction) , hence $x$ must be transcendental because of $$\frac{\ln(q_{n+1})}{\ln(q_n)}>2$$ for $n>2$

The first $250$ digits of $x$ after the decimal point contain the combinations $7777$ , $9999$ and $8888$ (in this order), which seems unusual to me. I would like to know how unusual it is :

What is the probability that a string of $250$ random digits contains the combinations $7777$ , $8888$ and $9999$ ?

  • 0
    For those who are interested : The first $250$ digits of $x$ are : 59264304924245940099235719445951588425007072726234450622459998612742905690709439 27238777706491332219762649433523325410125530763342573668605556315100384066391724 09373604853599974969674158677503401151778540119160259872009699993150164244604888 00402688882017-02-13
  • 0
    Actually, I investigated the first $500$ digits and noticed some other unusual properties : $9$ occurs $71$ times (Odds : about 1 : 564) and $98$ and $99$ both occur $12$ times (Odds ?)2017-02-13

2 Answers 2

1

Four numbers in a row means that three numbers in a row all equal the previous one. The odds in one spot are one in 1000. So you expect it to happen in a 250 digit number one time in four (250/1000).
I think the odds for it to happen three times is $e^{-\lambda}\lambda^3/6$, where $\lambda=1/4$. That is 0.002, or one chance in 493.

For the 9s, try a test: Pick 500 random digits, and write down how often the most common digit appears. Your software probably has a histogram command to do the counting for you. Do it ten times, then judge how likely it is to get 71 out of 500.

Given 71 nines in the 500 digit number, that makes 99s much more likely. In that case, I don't think twelve of them is unlikely.

  • 0
    $1)$ I have already calculated how likely $71$ nines are. $2)$ The occurence of the digits is not independent. I am not sure whether the answer considers this $3)$ You are right that $12$ times $98$ and $99$ is not so unusual, I only mentioned it since it is still well above the average.$4)$ ten trials is definitely not enough to estimate a probability2017-02-13
  • 0
    In a simulation, $13$ of $10^6$ random strings had the desired property.2017-02-13
  • 1
    Wow, that's less than I would have thought.2017-02-13
  • 0
    Given your interest was spiked by the 9999, what are the odds of getting 67 nines in the other 496 digits?2017-02-13
  • 0
    By the way, $98$ and $99$ occuring at least $12$ times occured $79$ times out of $10^6$ in another simulation. The probability to get $67$ nines (or more) out of $496$ is $0.0074$2017-02-13
  • 0
    You must consider that I forced $7777$ , $8888$ and $9999$ to appear. If we allow any $3$ digits, the probability will increase drastically. And you must also consider that $999999$ would be enough that $9999$ appears $3$ times, but this does not count. Since the factor the probability increases is $\binom {10}{3}=120$, your approach seems to be not bad at all :)2017-02-13
  • 0
    (+1) for presenting an approach that might give a reasonable approximation2017-02-13
  • 0
    The argument with the $120$ is not totally valid because the events are not completely independent, but it should be near the truth.2017-02-13
1

To answer your question precisely, we can create forty-four different functions each of which represent "how many ways are there to create an $n$-digit digit string such that ..."; fortunately, for each of these functions $F_i$, $F_i(n+1)$ is a linear combination of the values $F_j(n)$, so we can represent the whole slate of functions as a matrix, then take the matrix to the 250th power, and read off the answer.

So, first off, the functions. Let's assign some names:

$a_0(n)$ will represent $n$-digit strings containing none of "7777", "8888", or "9999" that do not end in "7", "8", or "9"
$b_0(n)$ will represent $n$-digit strings containing "7777" but not "8888", or "9999" that do not end in "8" or "9"
$c_0(n)$ will represent $n$-digit strings containing "8888" but not "7777" or "9999" that do not end in "7" or "9"
$d_0(n)$ will represent $n$-digit strings containing "9999" but not "7777" or "8888" that do not end in "7" or "8"
$e_0(n)$ will represent $n$-digit strings containing "7777" and "8888" but not "9999" that do not end in "9"
$f_0(n)$ will represent $n$-digit strings containing "8888" and "9999" but not "7777" that do not end in "7"
$g_0(n)$ will represent $n$-digit strings containing "7777" and "9999" but not "8888" that do not end in "8"
$h_0(n)$ will represent $n$-digit strings containing all three of "7777", "8888" and "9999"

For each function $x_0$, define $x_7$ to be the number of strings that end in "7" but not in "77" and would meet the requirements of being in $x_0$ if the final "7" were replaced with a "0". Similarly, define $x_{77}, x_{777}, x_8, x_{88}, x_{888}, x_9, x_{99}, x_{999}$.

The forty-four function we then need are:

$$ a_0, a_7, a_{77}, a_{777}, a_8, a_{88}, a_{888}, a_9, a_{99}, a_{999} \\ b_0, b_8, b_{88}, b_{888}, b_9, b_{99}, b_{999} \\ c_0, c_7, c_{77}, c_{777}, c_9, c_{99}, c_{999} \\ d_0, d_7, d_{77}, d_{777}, d_8, d_{88}, d_{888} \\ e_0, e_9, e_{99}, e_{999} \\ f_0, f_7, f_{77}, f_{777} \\ g_0, g_8, g_{88}, g_{888} \\ h_0 $$

Note that $a_0(0) = 1$, but that all the other functions are 0 for $n=0$.

Then we work out the recurrences, which are pretty straightforward so I won't explain my reasoning (though you should double-check my work because it's also tolerably tedious and easy to make a mistake)

\begin{align} a_0(n+1) &= 7a_0(n) + 7a_7(n) + 7a_{77}(n) + 7a_{777}(n) + 7a_8(n) + 7a_{88}(n) + 7 a_{888}(n) + 7 a_9(n) + 7 a_{99}(n) + 7 a_{999}(n) \\ a_7(n+1) &= a_0(n) + a_8(n) + a_{88}(n) + a_{888}(n) + a_9(n) + a_{99}(n) + a_{999}(n) \\ a_{77}(n+1) &= a_7(n) \\ a_{777}(n+1) &= a_{77}(n) \\ a_8(n+1) &= a_0(n) + a_7(n) + a_{77}(n) + a_{777}(n) + a_9(n) + a_{99}(n) + a_{999}(n) \\ a_{88}(n+1) &= a_8(n) \\ a_{888}(n+1) &= a_{88}(n) \\ a_9(n+1) &= a_0(n) + a_7(n) + a_{77}(n) + a_{777}(n) + a_8(n) + a_{88}(n) + a_{888}(n) \\ a_{99}(n+1) &= a_9(n) \\ a_{999}(n+1) &= a_{99}(n) \\ \end{align}

\begin{align} b_0(n+1) &= a_{777}(n) + 8b_0(n) + 8b_8(n) + 8b_{88}(n) + 8b_{888}(n) + 8b_9(n) + 8b_{99}(n) + 8b_{999}(n) \\ b_8(n+1) &= b_0(n) + b_9(n) + b_{99}(n) + b_{999}(n) \\ b_{88}(n+1) &= b_8(n) \\ b_{888}(n+1) &= b_{88}(n) \\ b_9(n+1) &= b_0(n) + b_8(n) + b_{88}(n) + b_{888}(n) \\ b_{99}(n+1) &= b_9(n) \\ b_{999}(n+1) &= b_{99}(n) \\ \end{align}

\begin{align} e_0(n+1) &= b_{888}(n) + c_{777}(n) + 9e_0{n} + 9e_{9}(n) + 9e_{99}(n) + 9e_{999}(n) \\ e_9(n+1) &= e_0(n) \\ e_{99}(n+1) &= e_9(n) \\ e_{999}(n+1) &= e_{99}(n) \end{align}

\begin{align} h_0(n+1) &= e_{999}(n) + f_{777}(n) + g_{888}(n) + 10 h_0(n) \end{align}

And similarly for the other functions. (I got tired of typing in $\LaTeX$)

Combining this into one giant matrix yields:

\begin{bmatrix} 7 & 7 & 7 & 7 & 7 & 7 & 7 & 7 & 7 & 7 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 1 & 1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 &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 0 & 1 & 0 & 0 & 0 & 1 & 10 \end{bmatrix}

Plug that into your favorite CAS, raise it to the 250th power, and then take the entry in the bottom-left corner. That's how many strings fit your criteria.

(the CAS I know best is Mathematica, but unfortunately I no longer have a local license and the free licenses available for Wolfram Cloud don't include enough computation time to finish this)


EDIT: I was entering the matrix into Wolfram wrong (love those hidden control characters). When I entered it straight, I got the 245-digit result:

98170447140570291841036643727248100210336162740967176860147709972660555975116916441369583687402322170651107248986895791560801830664164915952696011514631109478105152889332791827305325485400231794457444406335869180096544160081677017091458802473248

So the probability is $\approx 9.817 \times 10^{-6}$

  • 0
    Maybe, anyone can program this. I do not think I will do it :)2017-02-13
  • 0
    Working _Mathematica_ session that computes the answer: https://www.wolframcloud.com/objects/6cb00adf-26db-4463-9217-8d830105fbdd2017-02-13