4 ms·
Just a random question that popped into my head while reading (thank you for the article!)... What would be the longest repetitions of digits within various or
by DEinspanjer 12y ago
Just a random question that popped into my head while reading (thank you for the article!)... What would be the longest repetitions of digits within various orders of magnitude of Pi?
In other words, the first 10 characters (again looking at only the fractional portion:
1415926535
The longest repetition is a length of one and the digit is 1.
Playing with regexes, I found:
In 100 digits, you get a repetition of the digits 592
In 1000 digits, the first longest repetition is 23846
In 10000 digits, I found a six digit repetition, 120190 but
at that point, the quadradic nature of the regex made searching for 7 impossible so I would probably write a program that used something like suffix trees to get further.