3 ms·
Pi makes finding particular digit patterns somewhat hard. A number in which any digit pattern can be more easily found is Champernowne's constant [1] C10 =
by tromp 3y ago
Pi makes finding particular digit patterns somewhat hard. A number in which any digit pattern can be more easily found is Champernowne's constant [1]
C10 = 0. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ...
([0..]>>=show in Haskell) which is provably normal in base 10 (for pi it's widely believed but unproven).
Of course the minimal index i(w) at which digit sequence w appears is about as long as w itself...
[1] https://en.wikipedia.org/wiki/Champernowne_constant https://en.wikipedia.org/wiki/Champernowne_constant
- tromp 3y agoSpecifically, the index in C10 where a decimal number dec of n digits may be found is n * dec - (10^(n-1)-1) `div` 9 + 1 - 10^(n-1)