A161874 Bases with smallest unhappy number (in that base) > 2.
16, 18, 20, 30, 130, 256, 1042, 4710, 7202, 10082, 47274, 65536, 65600, 351634, 426530, 431730, 764930, 5921514, 26639560, 32435910, 88605010, 97025190, 99562110
Offset: 1
Examples
In base 16, 2 is happy because the sequence it generates is 2 -> 4 -> (1,0) -> 1, while 3 is unhappy because the sequence it generates is 3 -> 9 -> (5,1) -> (1,10) -> (6,5) -> (3,13) -> (11,2) -> (7,13) -> (13,10) -> (1,0,13) -> (10,10) -> (12,8) -> (13,0) -> (10,9) -> (11,5) -> (9,2) -> (5,5) -> (3,2) -> (0,13) -> (10,9) -> ..., which repeats with period 6.
Links
- Lucas A. Brown, A161874.c
Programs
-
Mathematica
happyQ[n_, b_] := NestWhile[Total[IntegerDigits[#, b]^2] &, n, UnsameQ, All] == 1; Select[Range[2, 256], !MemberQ[{2, 4}, #] && happyQ[2, #] &] (* Amiram Eldar, Jun 16 2020 *)
Extensions
a(11) from Amiram Eldar, Jun 16 2020
a(12)-a(17) from Giovanni Resta, Jun 25 2020
a(18) from Lucas A. Brown, Aug 17 2022
a(19) from Lucas A. Brown, Aug 26 2022
a(20)-a(23) from Lucas A. Brown, Apr 25 2023
Comments