[go: up one dir, main page]

login
Lengths of runs of consecutive zeros in binary expansion of Pi.
1

%I #18 Nov 10 2018 09:35:17

%S 0,2,2,4,0,0,0,0,0,1,0,1,1,1,3,3,4,1,0,1,3,0,4,3,0,1,2,0,3,2,0,3,0,2,

%T 0,3,1,3,1,0,0,7,0,1,0,0,5,0,0,2,0,1,3,2,1,2,6,2,2,0,0,5,3,3,1,2,0,2,

%U 0,0,0,0,2,0,3,0,0,1,8,5,1,0,0,1,0,0,0,0,1,1,2,0,3,0,0,1,0,3,2,0,0,2,0,1,0,2,3,2,1,3,1,2

%N Lengths of runs of consecutive zeros in binary expansion of Pi.

%F a(n) = A004711(n+1) - A004711(n) - 1 = A320298(n) - 1 (this is about Pi/4, but they are essentially the same).

%t Flatten@ Map[If[Union@ # == {1}, ConstantArray[0, Length@ # - 1], Length@ #] &, Split@ RealDigits[Pi, 2, 250][[1]] ] (* _Michael De Vlieger_, Oct 20 2018 *)

%Y Cf. A004711, A320298.

%K nonn,base

%O 1,2

%A _Jack Zhang_, Oct 10 2018