OFFSET
1,3
COMMENTS
In the first 2^28 binary digits, 134220460 are "0" and 134214996 are "1". - Robert G. Wilson v, Jun 09 2010
This sequence ignores bits in the integer part of the binary expansion of Pi.
In contrast to A378472, this sequence does not require the length of the run of 0s to be exactly n, more 0s may follow. - M. F. Hasler, Feb 04 2026
EXAMPLE
Pi's binary expansion is 11.00100100001111110110101010001..., so the strings '0' and also '00' occur first at position a(1) = a(2) = 1 in the fractional part, and the strings '000' and '0000' occur first at position a(3) = a(4) = 7. - M. F. Hasler, Feb 04 2026
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.
MATHEMATICA
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 *)
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 *)
CROSSREFS
KEYWORD
base,nonn,more
AUTHOR
Will Nicholes, Jun 06 2010
EXTENSIONS
a(17)-a(27) from Robert G. Wilson v, Jun 09 2010
a(28)-a(31) from Michael S. Branicky, Feb 04 2026
STATUS
approved
