login
Position of start of first appearance of n consecutive 0's in the binary expansion of Pi.
1

%I #11 Mar 26 2019 15:03:31

%S 1,1,7,7,96,96,96,189,902,902,4267,8375,8375,8375,11791,11791,112954,

%T 436893,726844,726844,2005750,2005750,2005750,42248747,171498580,

%U 171498580,171498580

%N Position of start of first appearance of n consecutive 0's in the binary expansion of Pi.

%C In the first 2^28 binary digits, 134220460 are "0" and 134214996 are "1". - _Robert G. Wilson v_, Jun 09 2010

%C This sequence ignores bits in the integer part of the binary expansion of Pi.

%e 3 consecutive 0's are first found beginning at the 7th position in Pi's binary expansion, so the third term in this sequence is 7.

%t pib = ToString@ FromDigits[ RealDigits[Pi - 3, 2, 2^26][[1]]]; f[n_] := 3 + StringPosition[ pib, ToString[10^n], 1][[1, 1]]; f[1] = f[2] = 1; Array[f, 27] (* _Robert G. Wilson v_, Jun 09 2010 *)

%t With[{p=RealDigits[Pi,2,1715*10^5][[1]]},Flatten[Table[SequencePosition[ p,PadRight[{},n,0],1],{n,27}],1][[All,1]]-2] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Mar 26 2019 *)

%Y Cf. A004601, A050279.

%Y Cf. A178709. - _Robert G. Wilson v_, Jun 09 2010

%K base,nonn

%O 1,3

%A _Will Nicholes_, Jun 06 2010

%E a(17)-a(27) from _Robert G. Wilson v_, Jun 09 2010