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

Telling which number is where in decimal expansion

  1. Feb 19, 2012 #1
    I have the number .1212212221222212222122222122222221222222221222222222... (notice that the number of 2s increase by one each time)....

    Is there a way to come up with an equation that would tell you the number that's in the nth digit?
  2. jcsd
  3. Feb 19, 2012 #2


    User Avatar
    Science Advisor

    The "1"s occur in positions 1,3,6,10,15,... These are the triangular numbers n(n+1)/2 for non-negative integer n. So you want to see if the m-th position is a "1", just solve n2+n-2m = 0 and see if there are integer solutions. If not the answer is a "2".
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook