By: perfectionatic

Re-posted from: http://perfectionatic.org/?p=312

I was recently introduced to Kaperkar’s Constant.

It is quite magical. You take any four digit number , sort the digits from highest to lowest to create a new number , sort the digits from lowest to highest to get , and calculate and new number . You repeat this procedure enough times and you end up with .

I made a nifty implementation of that in Julia below.

### Like this:

Like Loading...

*Related*