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
11.001001000011111101101010100010001000010110100011...
and digits will be counted such that the first one after the decimal (the first 0 digit) has index 1.
Examples
The requested function is related to OEIS A178707 but differs in that input sequences may have leading zeros. OEIS A178708 and OEIS A178709 provide good test cases for large sequences of 0's and 1's.
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
Input/output formats
You can use any input and output formats: strings, lists, encoding the binary digits in integers, etc. Just use what is convenient for you.
Limitations
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 π).
Scoring
This is code golf, so the shortest program (in bytes or bits/8) wins.