How to know a given no. is terminating repeating ?

Aniket Jagtap's image