This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A378472 #50 Dec 23 2024 14:04:37 %S A378472 17,1,26,7,109,135,96,189,2610,902,4267,36139,17317,8375,479166,11791, %T A378472 112954,436893,1286743,726844,5572140,27456324,2005750,42248747, %U A378472 200643872,547151636,171498580,469458286,1222711767,2151391703,1407238214 %N A378472 Position of start of first run of exactly n zeros in the base-2 representation of Pi, or -1 if no such run exists. %C A378472 In base-2, Pi is: 11.00100100001111110110101010001... For this sequence, the integer part of Pi is ignored, and the first fractional bit is numbered one. %C A378472 No further terms <= 4*10^9. - _Michael S. Branicky_, Dec 04 2024 %F A378472 a(n) >= A178708(n). - _Michael S. Branicky_, Dec 13 2024 %e A378472 The first run of a single "0" bit is at position 17, so a(1) = 17. %e A378472 The first run of exactly 2 zeros is at position 1, so a(2) = 1. %o A378472 (Python) %o A378472 import gmpy2 %o A378472 gmpy2.get_context().precision = 2000000 %o A378472 pi = gmpy2.const_pi() %o A378472 # Convert Pi to binary representation %o A378472 binary_pi = gmpy2.digits(pi, 2)[0] # zero-th element is the string of bits %o A378472 outVec = [] %o A378472 for lenRun in range(1,20): %o A378472 str0 = "".join( ["0" for _ in range (lenRun)]) %o A378472 l1 = binary_pi.find("1"+str0+"1") %o A378472 outVec.append(l1) %o A378472 print(outVec) %Y A378472 Cf. A004601, A175945, A178708, A233836. %K A378472 nonn,base,more %O A378472 1,1 %A A378472 _James S. DeArmon_, Nov 27 2024 %E A378472 a(21)-a(31) from _Michael S. Branicky_, Dec 04 2024 %E A378472 Clarified definition, added escape clause - _N. J. A. Sloane_, Dec 23 2024