Telling which number is where in decimal expansion

1 reply · 2K views · last reply
Benn
Messages
34
Reaction score
0
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?
 
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".