Given a binary sequence of finite length, find the starting position where this sequence first appears in the binary digits of π (after the decimal). You can assume that an answer exists for any input sequence.
The binary digits of π start with
and digits will be counted such that the first one after the decimal (the first 0 digit) has index 1.
Some test cases below 10^9:
- 00100 → 1
- 11 → 11
- 00000000 → 189
- 11111111 → 645
- 0101000001101001 → 45038
- 00000000000000000000 → 726844
- 11111111111111111111 → 1962901
- 01000111010011110100110001000110 → 105394114
- 111111111111111111111111111111 → 207861698
- 100000000110000001100111100001 → 987654321
You can use any input and output formats: strings, lists, encoding the binary digits in integers, etc. Just use what is convenient for you.
Your program must be able to accept sequences of arbitrary (finite) length if run on an infinite-size computer, and terminate in finite time (assuming that a match always exists, which is what most people seem to believe in 2021 based on the pseudo-randomness of the digits of π).
This is code golf, so the shortest program (in bytes or bits/8) wins.