If you picked a number between $1$ to $10^n$ with no zero digits,find the probability that the digits’ product is less than the number’s square root

limitsnumber theoryprobabilityradicals

What is the probability if you picked a number with no zero digits between $1$ to $10^n$ that the digits' product is less than the number's square root?

You can't pick a number like $371790$ because it has a zero.

An example for it being bigger than the square root is $\;2\times2\times2\times2\times9\times9>\sqrt{222299}.$

An example for it being smaller than the square root is ;$2\times2\times2\times2\times9\times2<\sqrt{222292}.$

If there is a limit of the probability as n goes to infinity, what is it?

Best Answer

The probability goes to 0%. We can get this by converting products to sums via a logarithm.

Lemma: Let $p_n$ be the probability that an $n$ digit number with no zeros has its square root greater than the product of the digits. Then $$\lim_{n\rightarrow\infty}p_n = 0$$

On one hand, if $x$ is an $n$ digit number, then $x < 10^n$, so $\log_{10}(\sqrt{x}) < \frac{n}2$. On the other hand, if we choose a non-zero digit $d$ randomly from $\{1,\ldots,9\}$, we can consider the expectation $\mu$ of $\log_{10}(d)$. Computing this tells us $\mu$ is about $0.618$ - and, in particular, is greater than $\frac{1}2$ (since $9! > 10^{9/2}$ to be explicit). If we choose $n$ non-zero digits at random, the log of their product is the sum of their logs - hence has a mean of $n\mu$.

Therefore, the square root of a number being greater than the product of its digits requires that the average of $\log_{10}(d)$ over all of its digits (which are chosen uniformly at random) must be less than $\frac{1}2$ - and the central limit theorem assures us that, as $n$ gets large, the probability that such an average is beneath any threshold below the mean tends to $0$.

More strongly, since the log of the product of the digits is the sum of $n$ independently identically distributed variables (...with nice properties - like being finitely supported here), we can immediately apply the central limit theorem to see that $p_n$ tends to $0$ as desired.

To finish, let $q_n$ be the probability that a number with at most $n$ digits, all non-zero, has a square root greater than the product of its digits. Suppose we fix any $\varepsilon>0$ and some $k$ so that $p_n \leq \varepsilon$ for every $n > k$. Note that, as $n$ increases, the probability that an at most $n$ digit number has fewer than $k$ digits goes to zero - implying that $\lim_{n\rightarrow\infty}q_n \leq \varepsilon$ as well. This holds for every positive $\varepsilon$, so $q_n$ also goes to $0$. Note that this is a fairly weak bound - $q_n$ is an exponentially weighted average of the values of $p_n$, so follows $p_n$ quite closely.

This also implies that the product of digits is almost always greater than $n^{\alpha}$ for any $\alpha < \mu$ and is almost never greater than $n^{\beta}$ for any $\beta > \mu$. It's not clear what happens if we compare to $n^{\mu}$.


If we want an estimate of the probabilities $p_n$ for fixed $n$, we can approximate the average of the log of the digits as a normal distribution with mean $\mu$ and standard deviation $\frac{\sigma}{\sqrt{n}}$ where $\sigma$ is the standard deviation of the variable $\log_{10}(d)$ for a single digit. Note $\sigma \approx 0.3124$ if we compute it - so the probability of being less than $\frac{1}2$ is about the probability of a standard normal distribution producing a value as extreme as $\frac{\sqrt{n}(\mu - \frac{1}2)}{\sigma}$ (i.e. a value with this z-score). This can be written explicitly using the error function, but suffice to say, it's not very likely (the probability decays at least exponentially quickly as $n$ increases).

Related Question