Nice idea about finding "the loop length" after which "endings" repeat :) Perhaps some other puzzle could be invented from it.
However my approach was simpler - just taking modulo by 10eX where X is amount of digits in the number we seek. Then numbers won't grow longer than this.
I suspect your and mine approaches are really two versions of the same fact, however
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.