find the nth digit of the infinite integer sequence