2026 is a provably Happy New Year
Every new year, I like to see what makes this year's number interesting. For 2026, I got an easy first hit since it turns out that 2026 is an example of a Happy Number.
According to the Wikipedia page, "A happy number is a number which eventually reaches 1 when the number is replaced by the sum of the square of each digit." Here's a demonstration that 2026 is happy
2026 → 2² + 0² + 2² + 6² = 44
44 → 4² + 4² = 32
32 → 3² + 2² = 13
13 → 1² + 3² = 10
10 → 1² + 0² = 1
All integers are either happy or unhappy and the next happy new year will be in 2030! For further details, check out the Live Script written by Martin that forms today's pick of the week. You can download it from File Exchange or open it directly in MATLAB Online.
Happy New Year!

- Category:
- Fun,
- Live Script,
- Picks


Comments
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.