This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A161874 #42 May 06 2023 04:26:26 %S A161874 16,18,20,30,130,256,1042,4710,7202,10082,47274,65536,65600,351634, %T A161874 426530,431730,764930,5921514,26639560,32435910,88605010,97025190, %U A161874 99562110 %N A161874 Bases with smallest unhappy number (in that base) > 2. %C A161874 a(12) > 50000, if it exists. - _Amiram Eldar_, Jun 16 2020 %C A161874 a(18) > 1.5*10^6, if it exists. The smallest unhappy numbers corresponding to bases a(1)-a(17) are 3, 7, 3, 5, 20, 3, 12, 3, 3, 14, 3, 3, 3, 3, 3, 3, 23. - _Giovanni Resta_, Jun 25 2020 %C A161874 The smallest unhappy numbers in bases (a(18), ..., a(23)) are (3, 23, 3, 261, 6, 12). - _Lucas A. Brown_, Apr 25 2023 %C A161874 a(24) > 10^8, if it exists. - _Lucas A. Brown_, Apr 25 2023 %H A161874 Lucas A. Brown, <a href="https://github.com/lucasaugustus/oeis/blob/main/A161874.c">A161874.c</a> %e A161874 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. %t A161874 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 *) %Y A161874 Cf. A031177 (unhappy numbers in base 10), A161872, A362026. %K A161874 nonn,base,more %O A161874 1,1 %A A161874 _Jud McCranie_, Jun 20 2009 %E A161874 a(11) from _Amiram Eldar_, Jun 16 2020 %E A161874 a(12)-a(17) from _Giovanni Resta_, Jun 25 2020 %E A161874 a(18) from _Lucas A. Brown_, Aug 17 2022 %E A161874 a(19) from _Lucas A. Brown_, Aug 26 2022 %E A161874 a(20)-a(23) from _Lucas A. Brown_, Apr 25 2023