# Number Theory: Longest Runs of Zeros in Binary Digits of Square Root of 2

Studying the longest head runs in coin tossing has a very long history, starting in gaming and probability theory. Today, it has applications in cryptography and insurance. For random sequences or Bernoulli trials, the associated statistical properties and distributions have been studied in detail, even when the proportions of zero and one are different. Yet, I could not find any discussion on deterministic sequences, such as the digits or irrational numbers. The case study investigated here fills this gap, focusing on one of the deepest and most challenging problems in number theory: almost all the questions about the distribution of these digits, even the most basic ones such as the proportions of zero and one, are still unsolved conjectures to this day.

In this context, a run is a sequence of successive, identical digits. In random sequences of bits, runs have a specific probability distribution. In particular, the maximum length of a run in a random sequence of n binary digits has expectation log2 n (the logarithm of n in base 2). This fact can be used to test if a sequence violates the laws of randomness. Pseudo-random number generators that do not pass this test are not secure. The focus here is on sequences of binary digits of numbers such as SQRT(2). If working in base 10 rather than binary digits, replace log2 by the decimal logarithm.

In this short technical note, I feature a new result (with proof and empirical verification) about the largest run of zeros that you can potentially have, starting at position n in the binary expansion of these numbers.  Empirical evidence strongly suggests that as n increases (thus, asymptotically), the upper bound is indeed log2 n. If you can prove or disprove this conjecture, I will offer you a $1 million award, to match the offer by the Clay Institute to solve the Riemann Hypothesis. More on this in a future article. This is a serious offer: contact me if you want to know the details. Of course, what I was able to prove is a much weaker result, but still spectacular. I spent a considerable amount of time trying to improve it, to non-avail. Based on my experience, I know that this is an extremely challenging problem, harder than the Riemann Hypothesis. Do not try to solve it, there are many much easier ways to make$1 million. Nevertheless, I will pay you if you do. To see my weaker result and the Python code to efficiently compute billions of the binary digits in question, download this 5-page paper here on GitHub (no cost, no sign-up required). It features scientific computing at its finest, with the Gmpy2 library. In the table below, Ln represents the length of a run of zeros starting at position n, featuring the successive records only (longest runs).