login
A320302
Number of consecutive ones in binary expansion of Pi.
2
0, 1, 0, 1, 0, 0, 0, 6, 2, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 2, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0, 2, 1, 0, 2, 0, 0, 1, 0, 2, 0, 0, 2, 0, 2, 0, 0, 1, 1, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 3, 0, 2, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 2, 0, 5, 0, 2, 0, 0, 3, 1, 0
OFFSET
1,8
FORMULA
a(n) = A320300(n+1) - A320300(n) - 1 = A320301(n) - 1 (this is about Pi/4, but they are essentially the same).
MATHEMATICA
Rest@ Flatten@ Map[If[Union@# == {0}, ConstantArray[0, Length@ # - 1], Length@ #] &, Split@ RealDigits[Pi, 2, 180][[1]] ] (* Michael De Vlieger, Oct 20 2018 *)
CROSSREFS
Sequence in context: A296432 A171542 A335587 * A284761 A021165 A165061
KEYWORD
nonn,base
AUTHOR
Jack Zhang, Oct 10 2018
STATUS
approved