A381046 Happy repdigit numbers.
1, 7, 44, 888, 5555, 88888, 1111111, 2222222, 22222222, 77777777, 1111111111, 7777777777, 22222222222, 44444444444, 444444444444, 1111111111111, 4444444444444, 7777777777777, 999999999999999, 7777777777777777, 22222222222222222, 77777777777777777
Offset: 1
Examples
888 is a term since it is a repdigit number consisting of digit 8 only and is also a happy number (64+64+64 = 192, and 1+81+4 = 86, and 64+36 = 100, and 1+0+0 = 1).
Links
- Shyam Sunder Gupta, Happy Numbers, Exploring the Beauty of Fascinating Numbers, Springer (2025) Ch. 7, 209-222.
Programs
-
Mathematica
happyQ[n_] := NestWhile[Total[IntegerDigits[#]^2] &, n, UnsameQ, All] == 1; Select[Union[Table[k*(10^n - 1)/9, {k, 1, 9}, {n, 17}] // Flatten], happyQ] (* Amiram Eldar, Apr 14 2025 *)