# What is the probability of seven repeating digits in a number?

This number:

N[Pi^(Im[ZetaZero[2]]/Im[ZetaZero[3]]), 40]


entered for example in Wolfram Alpha or Mathematica gives:

2.617355378194777777793535722830190802923

which has 7 repeating 7:s.

What is the probability of that happening or is it just as probable as any other number?

Dividing 2.617355378194777777793535722830190802923 with 589:

N[Pi^(Im[ZetaZero[2]]/Im[ZetaZero[3]]), 40]/589


amplifies this effect:

0.004443727297444444444471198171188778952331

with 10 repeating 4:s.

-

If you pick a random sequence of 40 decimal digits, then the probably of getting a run of at least $m$ 7s can be calculated using the formula given in the answer to this question. You can consider the choice of digits as Bernoulli trials with outcomes of 7 with probability 0.1 or not-7 with probability 0.9. For $p=0.1,m=7,n=40$ this is about $3\times 10^{-6}$ and hence the probability that there is a sequence of seven or more of any digit is about $3\times 10^{-5}$.

As you consider more digits ($n\to \infty$) the probability goes to 1 for a random choice of digits, and likely for any specific number you choose, since there's a good chance it is normal.

-
Somewhere along the line we needed to assume the digits appear at random independently and uniformly. The conclusion about converging to 1 as n approach infinity would work for non-uniform distributions. The exact probability calculation would differ somewhat. – Michael Chernick Jun 12 '12 at 2:23