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 A199693 #25 Dec 04 2021 11:27:58 %S A199693 12,4,16,126,6,2,2,8,8,16,2,6,8,48,8,6,4,24,4,24,12,24,2,8,2,896,6, %T A199693 224,28,6,8,4,2,4,64,4,4,224,8,8,2,4,12,124,24,14,256,32,2,14,62,2,4, %U A199693 24,14,24,4,28,6,12,8,4,2,8,2,4,2,32,16,60,24,56,6 %N A199693 Related to the expansion of Pi in base 2 (A004601). %C A199693 A004601 is the concatenation of binary digits of the terms written in base 2. %e A199693 A004601( expansion of Pi in base 2) : %e A199693 1,1,0,0,1,0,0,1,0,0,0,0,1,1,1,1,1,1,0,1,1,0,1,0,1,0.... -> %e A199693 1,1,0,0 | 1,0,0 | 1,0,0,0,0 | 1,1,1,1,1,1,0 | 1,1,0 | 1,0 | ... -> %e A199693 1100 | 100 |10000 | 1111110 |110 |10 | 10 | ... (in base 2) -> %e A199693 12 , 4, 16, 126, 6, 2, 2, ... (in base 10) . %t A199693 f[{a_, b_}] := (2^a - 1)*2^b; f /@ Partition[Length /@ Split[First[RealDigits[π, 2, 10^3]]], 2] (* _T. D. Noe_, Nov 09 2011 *) %o A199693 (Python) %o A199693 import gmpy2 %o A199693 pi = gmpy2.const_pi(precision=310) # increase precision for more terms %o A199693 h = "{0:A}".format(pi)[2:-5].replace(".", "") %o A199693 b = bin(int(h, 16))[2:] %o A199693 splitb = b.replace("01", "0,1").split(",") %o A199693 print([int(t, 2) for t in splitb[:-1]]) # _Michael S. Branicky_, Dec 04 2021 %Y A199693 Cf. A004601, A007088. %K A199693 easy,nonn,base %O A199693 1,1 %A A199693 _Philippe Deléham_, Nov 09 2011