Work out happy number checker instantly with clear inputs, formula shown and shareable results.
Repeatedly replace a number by the sum of the squares of its digits. If you reach 1 the number is happy; otherwise you always fall into the single cycle 4 → 16 → 37 → 58 → 89 → 145 → 42 → 20 → 4.
Happy step
v → Σ d² over the digits of v
Yes: 4 + 9 = 13, then 1 + 9 = 10, then 1 + 0 = 1, in three steps.
For numbers below 1000 the map always drops below 244, and exhaustive checking of that small range finds just the one cycle.