Find the repeating number in a sequence from 1 to n.