Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to find 'self locating digits' in irrational numbers

  1. Aug 3, 2012 #1
    Let us take the most mainstream irrational out there, (Pi).

    Now write (Pi) as:


    Let us number the decimals of Pi.

    0 gets paired with 1
    1 gets paired with 4
    2 gets paired with 1
    6 gets paired with 6

    Thus 6 is a self locating digit.

    My question is then how do we devise a method to find these self locating digits in a fast way.

    This is how I've gone about it.

    consider λ=(Pi)-3=0.14159265...

    now consider digit number n, that is, the digit that is n places along:

    0 gets paired with 1
    1 gets paired with 4
    2 gets paired with 1
    6 gets paired with 6
    n gets paired with x

    We need an algorithm for finding out what x is without writing the whole of λ out.

    Consider a new rational number, ρ.

    Let ρ_n be the number which terminates at digit n.

    Then ρ_n=0.1415926...x
    ρ_(n-1)=0.1415926...w where w is the (n-1)th digit etc

    Now consider (ρ_n)*10^(n+1) this is equal to 1415926...x. Let us call this new number β.

    We can then find what x is by subtracting ρ_(n-1)*10^(n) from β.

    Now if the x = n we have a self locating digit.

    This method isn't terribly practical as we still have to basically know what ρ_n is.

    Maybe I'll come up with an improvement after some thought but in the mean time I'd love to see what you guys come up with :)
  2. jcsd
  3. Aug 3, 2012 #2
    Right, the problem is that we have no formula for the n-th digit of pi that doesn't involve calculating all the preceding digits.

    But it turns out that someone did find such a formula. It only works in base 16, but it's still amazing that such an algorithm exists.

  4. Aug 3, 2012 #3
  5. Aug 5, 2012 #4


    User Avatar
    2017 Award

    Staff: Mentor

    It is a formula for all digits. But if you want to calculate a specific one, you can calculate it quickly, the wikipedia page explains how.

    By the way, what happens to the 11th digit in base 10, for example? A digit cannot be "11" there.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook