A quick look at an iterative algorithm that leads to a fixed cycle. I have no idea if there exist any applications outside of recreation. This is probably a little light/hand-wavey for a mathematician and not useful enough for a pragmatist. I'm also using this post to try out Klipse for in-blog code execution.
This post is highly recommended to view on a desktop. The python code snippets are editable and runnable and (most of) the plots are interactive.
Kaprekar's routine is a simple iterative algorithm that leads to a fixed point. It is so simple that anyone can play with it and have fun. In that respect, it reminds me a bit of the Collatz conjecture.
By running this routine, every starting 4 digit number converges to the number 6174 in at most 7 iterations. 6174 is known as Kaprekar's Constant.
This relationship exists for 3 digit numbers as well, except the fixed point is the number 495. Interestingly, for 3 digits the starting number converges in <= 6 iterations. Here is an example: