Generalized Kaprekar Routine

This Demonstration shows fractal patterns in the number of steps required to reach a fixed point or cyclic behavior in an application of Kaprekar's routine applied to the natural numbers for different bases.
To apply the Kaprekar routine for a positive integer greater than 1, arrange the digits of in base in descending () and ascending () order, compute (discarding any initial 0s). Repeating this procedure eventually leads to a cycle or a fixed point. The number of steps required, , plotted as a colored square at the position , produces beautiful fractal patterns. This Demonstration explores a subset of these patterns by allowing the setting of starting values and ranges for and .
comments
 
Powered by Wolfram Mathematica
Give us your feedback
Give us your feedback

Source page:




 often  occasionally  never

Note: Please do not include anything you consider confidential or proprietary. Your message and contact information may be shared with the author of any specific Demonstration for which you give feedback, but will not otherwise be published or distributed.
Privacy Policy »

Note: To run this Demonstration you need the free
Mathematica Player
or Mathematica 7+
Download or upgrade to Mathematica Player 7
I already have Mathematica Player or Mathematica 7+