Code Golf: Four is magic
The puzzle A little puzzle I heard while I was in high school went something like this... The questioner would ask me to give him a number; On hearing the number, the questioner would do some sort of transformation on it repeatedly (for example, he might say ten is three ) until eventually arriving at the number 4 (at which point he would finish with four is magic ). Any number seems to be transformable into four eventually, no matter what. The goal was to try to figure out the transformation function and then be able to reliably proctor this puzzle yourself. The solution The transformation