
EXAMPLE

3 is a term as starting from 3 the sequence of visited numbers is 3,2,0,3 and 3 is the first term to repeat.
23 is a term as starting from 23 the sequence of visited numbers is 23,22,20,17,13,8,2,9,1,10,0,11,23 and 23 is the first term to repeat.
290 is a term as starting from 290 the sequence of visited numbers is 290,289,287,284,280,275,269,262,254,245,235,224,212,199,185,170,154,137,119,100,80,59,37,14,38,13,39,12,40,11,41,10,42,9,43,8,44,7,45,6,46,5,47,4,48,3,49,2,50,1,51,0,52,105,159,104,160,103,161,102,162,101,163,226,290 and 290 is the first term to repeat. This is almost certainly the largest such value.
