Exploring Melancholy Numbers

Happy Number Engine

Here is the interactive that applies the Happy Numbers algorithm again in case you want it in your explorations.

Enter a whole number up to 999,999.

Click "Go!" to see your number and the next number. Keep clicking "Go!" to get more numbers.

Click "Reset" to start with a new number. (Or just type a new number in the box and click "Go!".)

Melancholy Steps Calculator

Did you notice that after a while, melancholy numbers get stuck in a loop with the same numbers repeating over and over? This loop is called the Melancoil. The numbers in the Melancoil are 4, 16, 37, 58, 89, 145, 42, and 20.

Use this calculator to find out how many steps away a melancholy number is from the Melancoil. Enter a number and click "Go!"

Click "Reset" to try a new number. Click "Clear" to clear the results area.


Melancholy Steps for a Range

To find the degrees of separation from the Melancoil for a range of numbers, enter the low and high ends (between 1 and 999,999) of your range and click 'Go!'. You may also specify the minimum and maximum degrees of separation you wish to be reported (otherwise you will get lots and lots of results if you give a large range).

If there are lots of results, they may take a few seconds to show up.

Click Reset to clear the current results and try new numbers.

Low High

Minimum degrees reported

Maximum degrees reported

Melancholy Steps Distribution Graph

To find the distribution of degrees of separation from the Melancoil for a range of numbers, enter the low and high numbers and click "Go!". The high and low ends of the range must be between 1 and 999,999.

Happy numbers are shown in red and are in the column marked H.

Numbers on the melancoil are shown in purple and have 0 degrees of separation.

All other numbers are shown in blue and their degrees of separation are given on the horizontal axis.

Low High