[Question]
  [
## Challenge :
\$\pi\$ is supposed to be infinite. That means every number is contained inside the decimal part of \$\pi\$.
Your task will be to take a positive integer on input and return the position of this number in \$\pi\$ digits on output.
For example, if the input is `59`, we'll return `4`
**Here is why :** we will look for the number `59` in the digits of \$\pi\$
```
3.14159265...
     ^^
```
The value starts at the 4th digit, so the output will be `4`.
**Some other examples :**
```
input : 1      output : 1
input : 65     output : 7
input : 93993  output : 42
input : 3      output : 9
```
## Rules :
* You don't have to handle digits that doesn't exist within the first 200 digits
* Standard loopholes are, as always, forbidden.
* This is [codegolf](/questions/tagged/codegolf "show questions tagged 'codegolf'"), so the fewer bytes wins.
  
[Answer]
# Python 2, ~~69~~ ~~75~~ ~~71~~ 67 bytes
*Saved 4 bytes due to [caird coinheringaahing](https://codegolf.stackexchange.com/posts/comments/390415?noredirect=1).*
```
x=p=1333
while~-p:x=p/2*x/p+2*10**200;p-=2
print`x`.find(input(),1)
```
Not finding `3` at position zero cost ~~6~~ 2 bytes. Input is given as a string.
[Try it online!](https://tio.run/##K6gsycjPM/r/v8K2wNbQ2NiYqzwjMye1TrfACiiib6RVoV@gbaRlaKClZWRgYF2ga2vEVVCUmVeSUJGgl5aZl6KRmVdQWqKhqWOo@f@/kqmlEgA "Python 2 – Try It Online")
---
**Unbounded Version**
## Python 2, 224 bytes
```
def g():
 q,r,t,i,j=1,0,1,0,1
 while True:
  i+=1;j+=2;q,r,t=q*i,(2*q+r)*j,t*j;n=(q+r)/t
  if n*t>4*q+r-t:yield n;q,r=10*q,10*(r-n*t)
a=input()
l=len(`a`)
s=z=10**l;i=1-l
p=g().next;p()
while s!=a:s=(s*10+p())%z;i+=1
print i
```
Using an unbounded spigot based on the same formula used above.
[Try it online!](https://tio.run/##Jc5LjsIwDAbgfU4RFiMlqTs0ZVaNzCk4AJUI4CoKaWrE4/KdBBa2ZPuz9KcXX2@xX9eTP8uL0oOQM2RgIJjQQgefEvJxpeDlId99EZIatG5qsHcfjLMhUL2Zm6zNBGwmF1HVactVn2U0vP@r95aHF/lwkrG@ou3MDKWp3BaixYgU052VFgGDj@o4HrVY8F2hCY7QtkEkLEF/o3@yS0V@oy0bHIcF1WJs15S1/nm7GlOkTJElravtd/8 "Python 2 – Try It Online")
---
**Faster Version**
```
from gmpy2 import mpz
def g():
  # Ramanujan 39, multi-digit
  q, r, s ,t = mpz(0), mpz(3528), mpz(1), mpz(0)
  i = 1
  z = mpz(10)**3511
  while True:
    n = (q+r)/(s+t)
    if n == (22583*i*q+r)/(22583*i*s+t):
      for d in digits(n, i>597 and 3511 or 1): yield d
      q, r = z*(q-n*s), z*(r-n*t)
    u, v, x = mpz(1), mpz(0), mpz(1)
    for k in range(596):
      c, d, f = i*(i*(i*32-48)+22)-3, 21460*i-20337, -i*i*i*24893568
      u, v, x = u*c, (u*d+v)*f, x*f
      i += 1
    q, r, s, t = q*u, q*v+r*x, s*u, s*v+t*x
def digits(x, n):
  o = []
  for k in range(n):
    x, r = divmod(x, 10)
    o.append(r)
  return reversed(o)
a=input()
l=len(`a`)
s=z=10**l;i=1-l
p=g().next;p()
while s!=a:s=(s*10+p())%z;i+=1
print i
```
A much faster unbounded spigot, based on [Ramanujan #39](https://books.google.fr/books?id=oSioAM4wORMC&pg=PA38&hl=en#v=onepage&q&f=false).
[Try it online!](https://tio.run/##ZVLRjpswEHz3V2xVVbKNuWITciQR/Yiqb1WlQ7XJuQVDjEmT/Hy6BpI@VCB5dzzjnV17uIb33qn7vfF9B8duuCqw3dD7AN1wI9o0cKRsTwA@wte6q930q3aQ7wR0Uxtsqu3RBtw9CfACRhABqqikGRPzmheqXEO5rhlDgUWexPW28mXGOM8LGbE/77Y18M1PJhYGcMihp8Szz3RMApsx20QYcaWKMueWL/uPLPIWMUDTe9BgHcxmR@oE2C/F7hVqpyGWBCRItoerNa0GvcpiS1j4xukpdXxE8xh6DFcHk4CzgMvD/7O5R7PkUft3rO1rdzS02G2ftn4K0AIa1FtO5z9X6aZkiVIszQUoudlm3KYqy/NXAanl8VObcpcX23I95J@JieOBdOI6OTPeIMablWMhWWb9vCYB8ZpOHNUnfk48vyAYsxGzwC9kvvh1XLjnZtM9ar7/IP815daWLsvAtD13vY4ymS1D6F/qYTBOUx9zb8LkUWvOxo9G054RUlfWDVOgjLRVaxx9q98YGatbJTPO24OtZNqSocKn@OLMJRwGZC6vZPxQ1fuxoiOXWYIw@3Q72KSSZPDWBbD3u1T5pvgL "Python 2 – Try It Online")
[Answer]
# [Husk](https://github.com/barbuz/Husk), 5 bytes
```
€tİπd
```
[Try it online!](https://tio.run/##yygtzv7//1HTmpIjG843pPz//9/S2NLSGAA "Husk – Try It Online")
### Explanation
```
€tİπd                              59
    d  Convert to base-10 digits   [5,9]
  İπ     The digits of pi          [3,1,4,1,5,9..]
 t       Remove the first element  [1,4,1,5,9,2..]
€      Index of the sublist        4
```
[Answer]
# Excel, 212 bytes
```
=FIND(A1,"14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196")
```
Excel only handles 15 decimal places so pi is just hard-coded. This should be a pretty weak upper bound for this challenge.
[Answer]
# Java 8, ~~615~~ ~~217~~ ~~202~~ ~~184~~ ~~182~~ ~~166~~ 165 bytes (calculated ~~999~~ 200 digits)
```
n->{var t=java.math.BigInteger.TEN.pow(200);var r=t;for(int p=667;p-->1;)r=t.valueOf(p).multiply(r).divide(t.valueOf(p-~p)).add(t).add(t);return(r+"").indexOf(n,1);}
```
1-indexed
[Try it online.](https://tio.run/##hZBPS8QwEMXv@ymGnhK0YeviSgndg@DBg/Ww3sRDbNKamqYhnVaXpX71mu4f8CILE4bM@/GYN7UYRFzLz6kwouvgSWi7XwBoi8qXolCQz9/DAAqyRa9tBZbyMBzDC9WhQF1ADhYymGy82Q/CA2Z1cGaNwA92r6vH4Fcpz14ecubaL3KzXFI@cz5DXraezP4uW6/vuIvjTcJpENggTK@eS@Ioa3qD2pkd8ZRJPWipyB89/nGUMiElwXPjXmHvLfFXUUSZtlJ9B9JeJ5SPEz@u7vp3E1Y/JRhaLaEJBzjFfH0DQY/pt7sOVcPaHpkLEhpLLCtIlET0cIr/ifXtRSRdpenqInUmxsU4/QI)
Java's builtin `Math.PI` has a precision of 15 decimal values, like many other languages. To have more digits, you'll have to calculate them yourself with `BigIntegers` or `BigDecimals`. This above is a way to do it.. ~~Maybe someone can golf this below 211 bytes, lol..~~  
EDIT: Created a port of [*@primo*'s Python 2 answer](https://codegolf.stackexchange.com/a/161164/52210) (make sure to upvote him!), so calculating being shorter than hard-coded is not so far-fetched anymore. ~~Just 7 more bytes to golf for it to be shorter.~~
-15 bytes thanks to *@Neil*, making it shorter than the hard-coded answer below!  
-36 bytes thanks to *@primo*.  
-1 byte changing `java.math.BigInteger t=null,T=t.TEN.pow(200),r=T;` to `var T=java.math.BigInteger.TEN.pow(200);var r=T;`, because `var` is 1 byte shorter than `null` (gotta love the new Java 10).
**Explanation:**
```
n->{                            // Method with String parameter and integer return-type
  var t=java.math.BigInteger.TEN.pow(200);
                                //  Temp BigInteger with value 10^200
  var r=t;                      //  Result BigInteger, also starting at 10^200
  for(int p=667;                //  Index-integer, starting at 667
      p-->1;)                   //  Loop as long as this integer is still larger than 1
                                //  (decreasing `p` by 1 before every iteration with `p--`)
    r=                          //   Replace the Result BigInteger with:
      t.valueOf(p)              //    `p`
       .multiply(r)             //    multiplied by `r`,
       .divide(t.valueOf(p-~p)) //    divided by `2*p+1`
       .add(t).add(t);          //    And add 2*10^200
  return(r+"")                  //  Convert the BigInteger to a String
    .indexOf(n,                 //  And return the index of the input,
               1);}             //  skipping the 3 before the comma
```
---
# Java 8, 211 bytes (hard-coded 200 digits)
```
"14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196"::indexOf
```
0-indexed
[Try it online.](https://tio.run/##hZBNbgIxDIX3nCKaFSyKbMdObFCPULpgWXUxHQY0FAJiBtSq4uzT8NNlhZQosvM@W@@ty1P5tF589tWmbFv3UjbpZ@Bck7r6sCyr2s0u5bXhquG8OzRp5dJompvnfPNpu7JrKjdzyT27vkBGMQriRS2aJ68cKLD36imaAKkyWsRg3sxHQRAlsMjGnEEPUTEwBNJAoGb5UfCsJJ4JMUKIpoSsoEHQk2YkBI5geRMHMJHLRPIYMyLGoEjKipnly3pGoAiY5ZLngYhYyCCRsZqwefCKForJpEmL@ut12U9vRvfHj002evd72jULt81x3UN5e3fl6JbV/Lvt6u14d@zG@/zVbdIwjathgcXoGtz/iiAPJdfYHqr@FOfBuf8F)
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 6 bytes
```
₁žs¦¹k
```
[Try it online!](https://tio.run/##MzBNTDJM/f//UVPj0X3Fh5Yd2pn9/78xAA "05AB1E – Try It Online")
**How?**
```
₁        push 256
 žs      push pi to 256 places
   ¦     remove the leading 3
    ¹    push the input
     k   index inside that string
```
[Answer]
# [MATL](https://github.com/lmendo/MATL), ~~16~~ 15 bytes
```
YP8WY$4L)jXfX<q
```
[Try it online!](https://tio.run/##y00syfn/PzLAIjxSxcRHMysiLcKm8P9/S2NLS2MA)
### Explanation
```
YP     % Push pi as a double
8W     % Push 2^8, that is, 256
Y$     % Compute pi with 256 significant digits using variable-precision arithmetic
       % The result as a string
4L)    % Remove first character. This is to avoid finding '3' in the integer part
       % of pi
j      % Push input as a string
Xf     % Strfind: gives array of indices of occurrences of the input string in the
       % pi string
X<     % Mimimum
q      % Subtract 1. Implicitly display
```
[Answer]
# [R](https://www.r-project.org/) + numbers package, 52 bytes
```
regexec(scan(),substring(numbers::dropletPi(200),3))
```
[Try it online!](https://tio.run/##K/r/vyg1PbUiNVmjODkxT0NTp7g0qbikKDMvXSOvNDcptajYyiqlKL8gJ7UkIFPDyMBAU8dYU/O/8X8A "R – Try It Online")
`dropletPi` computes the first 200 decimal digits of `pi` but includes a `3.` at the beginning, so we strip that out with `substring` and then match with `regexec`, which returns the index of the match along with some metadata about the match.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 23 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
⁵*⁹Ḥ;ȷḊ+J$¤×⁹:2¤:ɗ\SṾḊw
```
A monadic link accepting a list of characters (the integer to find) and returning the index. Works for inputs contained within the first 252 digits of the decimal part of π.
**[Try it online!](https://tio.run/##y0rNyan8//9R41atR407H@5YYn1i@8MdXdpeKoeWHJ4OFLIyOrTE6uT0mOCHO/cBJcr///@vbmlsaWmsDgA "Jelly – Try It Online")**
### How?
This uses the [Leibniz formula for π](https://en.wikipedia.org/wiki/Leibniz_formula_for_%CF%80) to calculate the first 253 digits including the leading `3` (plus four trailing incorrect digits). The leading `3` is then dropped and the index of the input is found:
```
⁵*⁹Ḥ;ȷḊ+J$¤×⁹:2¤:ɗ\SṾḊw - Link: list of characters
⁵                       - literal ten
  ⁹                     - literal 256
 *                      - exponentiate = 10000...0 (256 zeros)
   Ḥ                    - double       = 20000...0
          ¤             - nilad followed by links as a nilad:
     ȷ                  -   literal 1000
      Ḋ                 -   dequeue -> [2,3,4,5,...,1000]
         $              -   last two links as a monad:
        J               -     range of length -> [1,2,3,4,...,999]
       +                -     addition (vectorises) -> [3,5,7,9,...,1999]
    ;                   -   concatenate -> [20000...0,3,5,7,9,...,1999]
                  \     - cumulative reduce with:
                 ɗ      -   last three links as a dyad:
               ¤        -     nilad followed by link(s) as a nilad:
            ⁹           -       chain's right argument (the right of the pair as we traverse the pairs in the list -- 3, 5, 7, 9, ...)
              2         -       literal two
             :          -       integer division (i.e. 1, 2, 3, ...)
           ×            -     multiply (the left of the pair, the "current value", by that)
                :       -   integer divide by the right argument (i.e. 3, 5, 7, 9, ...)
                   S    - sum up the values (i.e. 20000...0 + 66666...6 + 26666...6 + 11428...2 + ... + 0)
                    Ṿ   - un-evaluate (makes the integer become a list of characters)
                     Ḋ  - dequeue (drop the '3')
                      w - first (1-based) index of sublist matching the input
```
If you prefer a list of digits as input use `⁵*⁹Ḥ;ȷḊ+J$¤×⁹:2¤:ɗ\SDḊw` (also 23), while if you really want to give it an integer use `⁵*⁹Ḥ;ȷḊ+J$¤×⁹:2¤:ɗ\SDḊwD` (for 24).
[Answer]
# BASH (GNU/Linux), ~~75~~ ~~67~~ 66 bytes
Saved 1 byte thanks to Sophia Lechner, and 7 bytes thanks to Cows quack.
```
a=`bc -l<<<"scale=999;4*a(1)"|tail -c+2|grep -ob $1`;echo ${a%%:*}
```
This is a shell script that takes a single argument, which is the number. Test with
```
$ bash <script-path> 59
4
```
This script first executes a pipeline of three commands:
```
bc -l<<<"scale=999;4*a(1)"|    #produce pi with its first 999 fractional digits
tail -c+2|                     #cut off the "3."
grep -ob $1                    #compute the byte offsets of our argument in the string
```
The result of this pipeline is assigned to the shell variable `a`, which is then echoed out with anything but the first number removed:
```
a=`...`;         #assign the result of the pipeline to a variable
echo ${a%%:*}    #cleave off the first : character and anything following it
```
---
Unfortunately, `bc` has the tendency to break output lines when they become too long. This may lead to wrong results if the number to be found is not on the first line. You can avoid that by setting the environment variable `BC_LINE_LENGTH`:
```
export BC_LINE_LENGTH=0
```
This deactivates the line breaking feature completely.
---
Obviously, the last two commands may be omitted if other output is tolerated.  
This gives a count of **48 bytes**:
```
bc -l<<<"scale=999;4*a(1)"|tail -c+2|grep -ob $1
```
With the resulting output:
```
$ bash <script-path> 59
4:59
61:59
143:59
179:59
213:59
355:59
413:59
415:59
731:59
782:59
799:59
806:59
901:59
923:59
940:59
987:59
```
[Answer]
# JavaScript, ~~197~~ 187
-10: Thanks, [Neil](https://codegolf.stackexchange.com/users/17602/neil)!
```
x=>"50ood0hab15bq91k1j9wo6o2iro3by0h94bg3geu0dnnq5tcxz7lk62855h72el61sx7vzsm1thzibtd23br5tr3xu7wsekkpup10cek737o1gcr6t00p3qpccozbq0bfdtfmgk".replace(/.{9}/g,a=>parseInt(a,36)).search(x)+1
```
Takes a series of nine-digit base-36 integers, converts them to base 10, and concatenates them to create the first 200 digits of pi.
[Answer]
First time doing code golf. Use delegates and lambda expressions to reduce the function calls. V2 shorten class name into a single byte.
# [C#], ~~361~~ 355 bytes
```
using System;class P{static void Main(){Func<string,int>F=f=>"14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196".IndexOf(f)+1;Action<int>w=Console.WriteLine;w(F("1"));w(F("65"));w(F("93993"));w(F("3"));}}
```
**Formatted version:**
```
using System;
class P
{
    static void Main()
    {
        Func<string,int>F=f=>"14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196".IndexOf(f)+1;
        Action<int>w=Console.WriteLine;
        w(F("1"));
        w(F("65"));
        w(F("93993"));
        w(F("3"));
    }
}
```
[Ideone!](https://ideone.com/xMp2Kg)
NB.I miscounted the first version. It was 361 bytes, not 363 bytes.
# [C#], tio version 218 bytes
```
f=>"14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196".IndexOf(f)+1
```
[Try it online!](https://tio.run/##hZDBSsNAEIbP5imWnBLUsjM7sztDbS9CQVAUPHgOaVoCbQLZVJTSZ4/bonjsXGYYvu8fmDre17GeDrHttub9O47Nfp5l9a6K0bwN/Xao9tkxM6niWI1tbT77dm1eqrYrysv6mN2sDl39EMchRdy13bg0K7OYNotlDgSs6NmxaFCHTsijJ@fEYVC2KEKgAbw6VRcYLAtaDaRESXQ2CHiyHsWjFdXUxDoSZEcIEKwPKggkVjyDQ0mK9xSspkvkrTKfE9FBSAorWQEUEkgunc8TWAwWEs4pzzKz@iQiKokyqbNOQH0@e@rWzdfrptiUtzCZ35pnf9Nj38V@18w@hnZsntuuKVZFDnlZXkE8X2cuv7mO/SOn7DT9AA)
[Answer]
# [Haskell](https://www.haskell.org/), ~~208~~ 120 bytes
```
a=1333
x=tail$show$foldr(\p x->p`div`2*x`div`p+2*10^200)a[3,5..a]
x!n|take(length n)x==n=0|1<2=1+tail x!n
f n=1+x!show n
```
[Try it online!](https://tio.run/##Vc3LTsMwEAXQvb/iJsqiD1rFNgVFwixgWUQrsUHioVjEbqIaJ2pcMFK/HeNmFVYzczRzp5b9XhkTghSUc068cLIxWV@335luTXWYvHbwi9uurJqvks38ULs5m9H8neX5VL7wi9VyKd@IT@zJyb2aGGV3roadeiGsyE/0hgk6P@ci7hANG0efnH/ABo8ydkdT3akSPxDoju7JHR4sMjQaHkJEdrWySDfrFMr0Culj67BZJykhn7Kx8apqCaBBx2l0oKvV2K4HK3hR8DFfssH/WRF@P7SRuz4snu@32z8 "Haskell – Try It Online")
Many thanks to [Jonathan Allan](https://codegolf.stackexchange.com/users/53748/jonathan-allan) for his suggestions!
### Old version (208 bytes)
```
(+1).((tail$g(1,0,1,1,3,3))!)
g(q,r,t,k,n,l)=([n:g(10*q,10*(r-n*t),t,k,div(10*(3*q+r))t-10*n,l)|4*q+r-t<n*t]++[g(q*k,(2*q+r)*l,t*l,k+1,div(q*(7*k+2)+r*l)(t*l),l+2)])!!0
x!n|take(length n)x==n=0|1<2=1+tail x!n
```
I actually don't know how the code above works; I've taken it from [this paper](https://www.cs.ox.ac.uk/jeremy.gibbons/publications/spigot.pdf) and all I implemented was the lookup part.
`g(1,0,1,1,3,3)` returns the digits of pi and is surprisingly efficient (it computes 10 000 digits on tio.run in less than 4s).
The input is a list consisting of the digits of the number to be found.
[Try it online!](https://tio.run/##VZDLasMwEEX3/oqxyUIvF8tOG1yiTbtMaQLZFNxATCM/sKrUtlJcyLfXHQcCjQYNzD33DkhV3jfamLFQ7yPhkt4R4vLazEoiRSQkViISSn3qlaQVnXCiEVYYqkhmH9EUsVZgI11omaMXfKi/J50krOUdpS7EYYqc55MQuiU6d5xnuJA1gsQXGzPC4W24vORbRhas4THlHTOUIKLC4Lijvh95g2/PLm80MdqWrgJLB6Wsis5yGSvJpwcAesYB9n11PJnDk97DDyj4Ormt614szKAuYAClUHaVthCsVwFo02sIXo8O1is/8LzPvLaYOhw9wFNAJnf/N8qr/CDub8DiClL8vRQrucHz@Mpv9XT8/ShMXvZj@Pa82fwB "Haskell – Try It Online")
[Answer]
# Haskell, 230 bytes
Using laziness to find the number anywhere in the infinite digits of pi, not just in the first 200 digits. Oh yeah, and it returns you every (infinitely many?) instance(s) of the number, not just the first one.
```
p=g(1,0,1,1,3,3)where g(q,r,t,k,n,l)=if 4*q+r-t<n*t then n:g(10*q,10*(r-n*t),t,k,div(10*(3*q+r))t-10*n,l) else g(q*k,(2*q+r)*l,t*l,k+1,div(q*(7*k+2)+r*l)(t*l),l+2)
z n=[(i,take n$drop i p)|i<-[1..]]
f l=[n|(n,m)<-z$length l,m==l]
```
## Examples from the challenge
```
>  take 10 $ f [1]
[1,3,37,40,49,68,94,95,103,110]
>  take 10 $ f [6,5]
[7,108,212,239,378,410,514,672,870,1013]
>  take 1 $ f [9,3,9,9,3]
[42]
>  take 10 $ f [3]
[9,15,17,24,25,27,43,46,64,86]
```
## Credits
'p' is the infinite stream of pi digits, taken from <https://rosettacode.org/wiki/Pi#Haskell>
```
> take 20 p
[3,1,4,1,5,9,2,6,5,3,5,8,9,7,9,3,2,3,8,4]
```
[Answer]
# SmileBASIC, ~~179~~ 164 bytes
```
INPUT I$FOR I=0TO 103Q$=Q$+STR$(ASC("\A#YO &.+& O2TGE']KiRa1,;N(>VYb>P0*uCb0V3 RB/]T._2:H5;(Q0oJ2)&4n7;@.^Y6]&"[I]))NEXT?INSTR(Q$,I$)+1
```
Digits of pi are hardcoded and packed into the ascii values of characters.
14 -> `CHR$(14)`, 15 -> `CHR$(15)`, 92 -> `\`, 65 -> `A`, 35 -> `#`.
The string contains unprintable characters, so here are the bytes written in hexadecimal: `0E 0F 5C 41 23 59 4F 20 26 2E 1A 2B 26 20 4F 32 1C 54 13 47 45 27 5D 4B 69 52 00 61 31 2C 3B 17 00 4E 10 28 3E 56 14 59 62 3E 50 03 30 19 03 2A 75 00 43 62 15 30 00 56 33 20 52 1E 42 2F 00 5D 54 2E 00 5F 32 3A 16 1F 48 35 3B 28 51 1C 30 6F 4A 32 1C 29 00 1B 00 13 26 34 6E 37 3B 40 2E 16 5E 59 36 5D 00 26 13 06`
In decimal, you can see the digits of pi: `14 15 92 65 35 89 79 32 38 46 26 43 38 32 79 50 28 84 19 71 69 39 93 75 105 82 0 97 49 44 59 23 0 78 16 40 62 86 20 89 98 62 80 3 48 25 3 42 117 0 67 98 21 48 0 86 51 32 82 30 66 47 0 93 84 46 0 95 50 58 22 31 72 53 59 40 81 28 48 111 74 50 28 41 0 27 0 19 38 52 110 55 59 64 46 22 94 89 54 93 0 38 19 6`
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~37~~ 35 bytes
```
p"#{BigMath::PI 200}"[3..-3]=~/#$_/
```
[Try it online!](https://tio.run/##KypNqvz/v0BJudopM903sSTDyirAU8HIwKBWKdpYT0/XONa2Tl9ZJV7//39LY0tL43/5BSWZ@XnF/3XzipIy01NSkzNzE3P0c4E6AQ "Ruby – Try It Online")
Nothing special, just showcasing the built-in library. Output is 0-indexed.
The Pi string is formatted as `0.31415...e1`, so we need to strip off the first 3 chars. The `e1` part in the end doesn't really do any harm, but it is stripped off too, as we need to provide a range end (or slice length) value anyway.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), ~~27~~ 15 bytes
```
Ｉ⊖∨⌕Ｉ▷N⟦≕Piφ⟧θχ
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z@gKDOvRMM5sbhEwyU1uSg1NzWvJDVFw79Iwy0zLwUi4VqWmFOaWJIalliUmZiUk6qh5KekoxDtnlqCEAnIVNLUUTA0MDCI1QQyCsEcTSCw/v/f@L9uWQ4A "Charcoal – Try It Online") Link is to verbose version of code. Works up to nearly 1000 digits. Explanation:
```
        ≕Pi     Get variable `Pi`
           φ    Predefined variable 1000
     ▷N⟦    ⟧   Evaluate variable to specified precision
    Ｉ           Cast to string
             θ  First input
   ⌕            Find
              χ Predefined variable 10
   ∨             Logical OR
  ⊖              Decrement
 Ｉ               Cast to string
                 Implicitly print
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), ~~186~~ 177 bytes
```
`nqnrvosrpruvtvpopuqsosqppÕÝvr¶uuqnvtnsvpvvptrnmruomvtqvqqrvopmÉæqÛàÑ$vvÔàmpqupqm¡vuqum«rnpopmssqtmvpuqqsmvrrmruoopÌÊprvqÛ$uqunnqr¶uqn¶tmnvpÔnmrrrvsqqsoovquvrqvpmpunvs`®c -#mÃbU
```
Since Japt shares Javascript's 15-digit Pi constraint and [shoco](http://ed-von-schleck.github.io/shoco/), the encoding used by Japt, doesn't encode numbers, some shenanigans are required for compression. 
Shortly explained, the beginning is the below string in encoded form:
```
"nqnrvosrpruvtvpopuqsosqppupotvrmouuqnvtnsvpvvptrnmruomvtqvqqrvopmtunsqmsousomuvvusoumpquorpqonntmstvuonqumusrnpouopmssqtmvpuqqsmvrrmruoopntorprvqmunouqunnntqrmouqnmotmnvpuronnmrrrvsqqsoovquvrqvpmpunvs"
```
Which is a string where each letter is `'m' + corresponding digit of pi`. I tested the whole alphabet and that letter gives the best compression by a few bytes.
Backticks tell Japt to decode the string. The rest of it is pretty straightforward: 
```
®c -#mÃbU
®          // Given the above string, map each letter
 c         // and return its charcode
   -#m     // minus the charcode of 'm', 109.
      Ã    // When that's done,
        bU // find the index of the implicit input U.
```
Outputs 0-based index of the matching fragment.  
Shaved another two bytes off thanks to [Oliver](https://codegolf.stackexchange.com/users/61613/oliver). 
[Try it online!](https://tio.run/##FY09ToJBEIavQiKtFY0XoUftSGZ23pmd9wJWEhsTrAgJNDQmlhxg52CfS//87F@tL8tOoc4Wbp7stGaJaAGz@qkzfdwzoewaNNK6q3g2YQeBKZrUZ91Qp7rU95qsY13EkAYZVyZSxq/rzEoEunDmEUL3R6ZZfdXBnNNfT1YVjyF03LsorY7z5s6YTmtE0kETS2Xsxt/76vlJ6uNtuyybzcs/)
[Answer]
# [AWK](https://www.gnu.org/software/gawk/manual/gawk.html) -M , ~~131 119~~ 117 bytes
Uses `-M` flag for arbitrary precision calculations.
Added `p=k=0` (5 bytes) to the TIO link to allow multi-line input
```
{CONVFMT="%.999f";PREC=1e3;for(p=k=0;k<1e3;)p+=(4/(8*k+1)-2/(8*k+4)-1/(8*k+5)-1/(8*k+6))/16^k++;$0=$1==3?9:index(p,$1)-2}1
```
[Try it online!](https://tio.run/##SyzP/v@/2tnfL8zNN8RWSVXP0tIyTck6IMjV2dYw1dg6Lb9Io8A229bAOtsGxNcs0LbVMNHXsNDK1jbU1DWCsEw0dQ0hLFM4y0xTU9/QLC5bW9taxcBWxdDW1tje0iozLyW1QqNARwWkudbw/39DBTDILy0pKC1RsFIw5DIzRRUx57I0trQ0RhIxMeIyRtNmyfUvv6AkMz@v@L@uLwA "AWK – Try It Online")
**Explanation:**
```
{CONVFMT="%.999f";  # Allows 999 decimal digits to be used when numbers are convert to strings
PREC=1e3;           # Digits of precision to use for calculations
for(;k<1e3;)p+=(4/(8*k+1)-2/(8*k+4)-1/(8*k+5)-1/(8*k+6))/16^k++; # The most concise numerical calculation I could find. It doesn't converge  extremely rapidly, but it seems to work OK
$0=$1==3?9:index(p,$1)-2}  # Replace input line with either 9 or index-2
                           # since indices will either be 1 (meaning 3 was input) or >= 3
1                   # Print the "new" input line
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 24 bytes
```
ȷ*
ȷR×¢:Ḥ‘$ƲU×:¢+¢ʋ/ḤṾḊw
```
[Try it online!](https://tio.run/##ATkAxv9qZWxsef//yLcqCsi3UsOXwqI64bik4oCYJMayVcOXOsKiK8Kiyosv4bik4bm@4biKd////yc2NSc "Jelly – Try It Online")
~~Use a [Machin-like formula](http://mathworld.wolfram.com/Machin-LikeFormulas.html), specifically 1/4 pi == tan-1(1/2) + tan-1(1/3).~~ 
Use the formula pi/2 == 1 + 1/3 × (1 + 2/5 × (1 + 3/7 × (1 + 4/9 × ( ... ))))
[Answer]
## Python 2 ~~239~~ ~~238~~ ~~229~~ 214 bytes
*-9 bytes due to [@primo](https://codegolf.stackexchange.com/users/4098/primo)*
```
from bigfloat import*;a=s=n=10**10**5;b=k=0
while a:k+=1;a*=k*(k*(108-72*k)-46)+5;a/=k**3*(640320**3/24);s+=a;b+=k*a
with precision(10**7):print`(426880*sqrt(10005*n)*n)/(13591409*s+545140134*b)`.find(input())-16
```
Uses the Chudnovsky-Ramanujan algorithm to find the first ~~1 million digits~~ 50000 digits of π (change `10**10**5` to `10**10**6` for more, but it takes ages to run) and then searches them for the desired string.
[Answer]
## Javascript 217 bytes (200 hardcoded)
```
a=>"14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196".search(a)+1
```
[Answer]
### PHP, 27 bytes
Not a very serieus answer, it requires a change in the php.ini settings as pi() defaults to 14 digits, not 200, but for once the PHP solution is fairly elegant:
```
<?=strpos(pi(),$_GET[n])-1;
```
[Answer]
# [Julia 0.6](http://julialang.org/), 53 bytes
```
setprecision(9^6)
x->searchindex("$(big(π))","$x",3)
```
Set the precision for BigFloats high enough, then convert `pi` to a string and search. Precision of `9^6` handles 159980 digits.
[Try it online!](https://tio.run/##DctLCsIwEADQtTlFGFpIYFxIaCALxXv4gX6SOCLTklaYpTf0SNG3f8/3i3pf03GImbiucVtKHGmlmU24e6tkf1pjX8YH8RTFQGMGyub7sRYQGgF0tkaeVJqLFk2sLwf0HXYBgwvBobup3XkpxFsy0Pqs23xlQMFkxFr1r/UH "Julia 0.6 – Try It Online")
[Answer]
# J, 25 Bytes
```
{.I.(}.":<[[email protected]](/cdn-cgi/l/email-protection)^999)E.~
```
[Try it online!](https://tio.run/##y/r/PzU5I1@hWs9TT6NWT8nKRs8hX8/QoCLO0tJS01WvTkHdEgzU//8HAA "J – Try It Online")
0-Indexed
Takes input as a string, +2 Bytes (`":`) if that's not allowed.
Explanation eventually.
[Answer]
## [Perl 5](https://www.perl.org/) with `-MMath::BigFloat+bpi` and `-n`, 20 bytes
```
bpi($>)=~/.$_/;say@-
```
[Try it online!](https://tio.run/##K0gtyjH9/z@pIFNDxU7Ttk5fTyVe37o4sdJB9/9/Qy4zUy5LY0tLYy5jLgtDSy4zExOjf/kFJZn5ecX/dX1N9QwMDYC0b2JJhpWVU2a6W05@Yok20LD/unk5AA "Perl 5 – Try It Online")
I'm not sure where usage of `$>` stands, since it's the `EFFECTIVE_USER_ID` which is not portable, but on TIO this is 1000 and satisfies our requirement, for -1 byte vs. `200`.
[Answer]
# [Husk](https://github.com/barbuz/Husk), 5 bytes
```
€tİπd
```
[Try it online!](https://tio.run/##yygtzv7//1HTmpIjG843pPz//9/S2NLSGAA "Husk – Try It Online")
```
€        The 1-based index as a substring of
    d    the decimal digits of
         the input
  İπ     in the infinite list of digits of pi
 t       after the radix point.
```
[Answer]
# [JavaScript (Node.js)](https://nodejs.org) (ES2020), 75 bytes
```
n=>`${eval(`for(a=c=2n*10n**300n,d=1n;a*=d;)c+=a/=d+++d`)}`.search("."+n)+1
```
[Try it online!](https://tio.run/##BcFLCsMgEADQu4Qu1Gmt1pWEyVkc/PSDjEFLNqFnt@996KAR@3v/3rilPAtOxi1cznxQFaG0LggjPlhZw0o5Y/ia0PJKCtMqIyDdMQFACvIX9MjU40ssegGWYGdsPFrNuranKMI7752U8w8 "JavaScript (Node.js) – Try It Online")
Uses the formula I've used in another Pi-related challenge. `search("."+n)` is needed to drop the leading `3`. Change `300` to a higher number gives more precision.
]