This is a sequel to my previous question which was this Squares of sum of digits of a number For those new I will give some context. Take a number then add up it's digits and square them then repeat this process and in the end you will get either 1,81,169,256. For proof and more information you can click on the link.
Now if I want to know after how many steps the sequence terminates that is after how many steps we get 1,81,169 or 256 for the first time, how do I proceed?