I thought it might be an interesting way for me to study/relay information by posting any cool tricks or any weird math facts I know. (Maybe even in a daily manner)
Happy Numbers vs Sad NumbersOne of those things I have no clue why exists, but it does so here are the definitions
Happy Number- A number whose sum of its digits squared recursively will eventually go to 1
Sad(Unhappy) Number- A number whose sum of its digits squared recursively will never go to 1 (Not a happy number)
For example take the number 7:
7
2=49
4
2+9
2 = 16+81 = 97
9
2+7
2 = 81+49 = 130
1
2+3
2+0
2 = 1+9+0 = 10
1
2+0
2 = 1+0 = 1
So 7 is a happy number
25 is a sad number, the work is:
2
2+5
2 = 4+25 = 29
2
2+9
2 = 4+81 = 85
8
2+5
2 = 64+25 = 89
8
2+9
2 = 64+81 = 145
1
2+4
2+5
2 = 1+16+25 = 42
4
2+2
2 = 16+4 = 20
2
2+0
2 = 4+0 = 4
4
2=16
1
2+6
2 = 1+36 = 37
3
2+7
2 = 9+49 = 58
5
2+8
2 = 25+64 = 89
At this point the process repeats (We already did 89), so 25 is an unhappy number.
Note: Any number generated during a process which ends with a number being happy is happy, and any number generated during a process that ends with a number being sad is sad.