I've found an old math puzzle in my notes, and I can't seem to figure it out: List out the primes under $100,000$ and find the first occurrence of each of these primes in $\pi$. What is the last prime you'll find? Visual Demo
As we can see in the image, the first prime we see is $14159$, then we see $41$, then $4159$, and so on.
Clarification: by last, I mean farthest/most number of digits from the decimal point
The last (the farthest) prime number of this list is $35569$; its distance of decimal point is $715492$. So, there is enough to have $1000000$ first digits of $\pi$ to reach the result.
Its place: $...2347781619751257278515\color{red}{35569}8616...$
Here is the (incomplete) list of first prime numbers occurrence distances:
Prime numbers under $1,000,000$: the farthest prime number $805289$ has distance $11\:137\:824$.
If consider any $5$-digital sequences, then the farthest one is $33394$ with distance $1\:369\:560$
($\approx$ $2$ times farther than prime number $35569$).
Any $6$-digital sequence: the farthest one is $569540$ with distance $14\:118\:307$
(see Pi Digits for more info).
(for Peter's request:)
to generate complete list (of n=100000 of n=1000000 items), I used simple C++ code.
Short description:
The code: