Where does a sequence first appear in pi?

Take the first few terms of an integer sequence, write them out as one string of digits, and look for that string in the decimal expansion of pi. This site tells you how far in you have to go, one row per term added, across the first billion digits.

Enter an OEIS A-number, a sequence name, terms separated by commas, or a plain string of digits.

Try one

  1. A000045 Fibonacci numbers7 terms at 4,253,057
  2. A000040 Prime numbers6 terms at 8,157,777
  3. A000290 Squares6 terms at 16,685,566
  4. A000079 Powers of 26 terms at 20,467,663
  5. A000108 Catalan numbers6 terms at 75,744,697
  6. A000217 Triangular numbers6 terms at 104,349,019
  7. A000142 Factorials5 terms at 1,380,572
  8. A000796 Digits of pi8 terms at 50,366,472
  9. A005132 Recamán’s sequence7 terms at 376,501,687
  10. A005150 Look and say4 terms at 802,177,755

Deepest, earliest, and rarest sequences

How this works

Positions count from the first digit after the decimal point, so 1 is at position 1 and the leading 3 is not searched. Terms are concatenated exactly as the OEIS lists them, leading zeros included and minus signs dropped. The staircase stops when the next term would push the string past twelve digits, because strings that long almost never occur in the first billion digits.

Every lookup is a handful of small reads against a precomputed index of the digits, never a scan, so results for any A-number or digit string come back in a few milliseconds.