Happy numbers
A happy number is a number that eventually reaches 1 when you repeatedly replace it with the sum of the squares of its digits.
Happy numbers are a purely mathematical grouping, defined entirely by what happens when you repeat the digit-square process — every number either reaches 1 (happy) or falls into the same repeating eight-number cycle forever (unhappy). This hub does not claim any cultural significance beyond that mathematical behaviour.
The digit-square process, step by step
Take 19 as a worked example: 1² + 9² = 1 + 81 = 82. Repeat: 8² + 2² = 64 + 4 = 68. Again: 6² + 8² = 36 + 64 = 100. Again: 1² + 0² + 0² = 1. Since the process reached 1, 19 is a happy number.
Every positive integer either reaches 1 this way (happy) or eventually enters the same repeating loop described below (unhappy) — there's no third outcome, and no number grows forever, because the digit-square sum of any number with several digits is always much smaller than the number itself.
Unhappy numbers and the repeating cycle
Every unhappy number eventually lands in the same eight-number loop: 4 → 16 → 37 → 58 → 89 → 145 → 42 → 20 → back to 4, forever. This is why the happy-number check can always stop cleanly — once a number hits 1 or re-enters a value it has already seen, the outcome is decided.
Happy numbers in the catalogue
1
7
10
13
19
23
28
31
32
44
49
68
70
79
82
86
91
94
97
100
103
109
129
130
133
139
176
190
192
193
203
208
226
230
236
239
262
263
280
291
301
302
310
313
319
320
331
356
365
367
376
379
383
386
392
404
409
440
464
490
496
556
563
565
566
617
622
632
635
673
680
683
700
763
793
802
818
847
863
881
901
904
913
964
970
973
998
1,000
1003
1009
1030
1033
1039
1067
1076
1088
1090
1092
1093
1112
1114
1115
1121
1122
1125
1128
1141
1148
1151
1152
1158
1177
1182
1184
1185
1188
1209
1211
1212
1215
1218
1221
1222
1233
1247
1251
1257
1258
1274
1275
1277
1281
1285
1288
1290
1299
1300
1303
1309
1323
1330
1332
1333
1335
1,337
1339
1353
1366
1373
1390
1393
1411
1418
1427
1444
1447
1448
1457
1472
1474
1475
1478
1481
1484
1487
1511
1512
1518
1521
1527
1528
1533
1547
1557
1572
1574
1575
1578
1581
1582
1587
1599
1607
1636
1663
1666
1670
1679
1697
1706
1717
1724
1725
1727
1733
1742
1744
1745
1748
1752
1754
1755
1758
1760
1769
1771
1772
1784
1785
1796
1808
1812
1814
1815
1818
1821
1825
1828
1841
1844
1847
1851
1852
1857
1874
1875
1880
1881
1882
1888
1900
1902
1903
1920
1929
1930
1933
1959
1967
1976
1992
1995
2003
2008
2019
2030
2062
2063
2112
2118
2151
2174
2181
2254
2620
2818
2865
2903
3132
3166
3200
3315
3546
3629
3901
3986
3987
4004
4040
4046
4,096
4,184
4217
4271
4287
4449
4725
4900
4960
5128
5218
5228
5245
5353
5545
6080
6302
6334
6346
6350
6543
6582
6650
6800
7000
7009
7090
7331
7408
7515
7518
7541
7968
8018
8081
8088
8118
8,128
8188
8200
8333
8441
8555
8801
8,848
8880
9001
9100
9310
9362
9829
10,000
11,770
13,818
17,024
17,025
27,015
27,017
27,701
28,000
28,978
29,100
31,000
32,000
37,301
40,585
41,256
43,560
60,038
60,163
60,320
60,364
60,559
60,825
65,521
68,000
74,138
90,210
90,377
99,942
100,000
101,955
162,173
192,000
314,159
1,000,000
2,598,960
2,629,746
1,000,000,000
1,602,176,634
3,200,000,000
4,294,967,296
1,000,000,000,000
Common questions
What is a happy number?
A happy number is a number that eventually reaches 1 when you repeatedly replace it with the sum of the squares of its digits. If it never reaches 1, it's called unhappy.
How do you check if a number is happy?
Split the number into digits, square each digit, add the squares together, and repeat with the result. If you reach 1, the number is happy. If you reach 4, you've entered the unhappy cycle and the number is unhappy.
Is 4 a happy number?
No. 4 leads to the sequence 4 → 16 → 37 → 58 → 89 → 145 → 42 → 20 → 4 — a closed loop that never reaches 1, so 4 is unhappy.