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 A193566 #22 Feb 16 2025 08:33:15 %S A193566 15,16,26,40,51,62,69,88,96,105,117,128,134,143,150,155,156,165,171, %T A193566 182,206,218,237,247,260,273,274,278,279,281,287,297,314,327,341,372, %U A193566 399,400,413,427,431,448,458,466,472,484,485,501,510,515,516,548,551 %N A193566 Unhappy numbers which enter the cycle (4, 16, 37, 58, 89, 145, 42, 20) at 16. %H A193566 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/UnhappyNumber.html">Unhappy Number</a>. %e A193566 466 is such a number of height 8 because it enters the cycle at 16 in 8 steps: 466 -> 88 -> 128 -> 69 -> 117 -> 51 -> 26 -> 40 -> 16 -> 37 -> 58 -> 89 -> 145 -> 42 -> 20 -> 4 -> 16 -> ... %p A193566 S:=proc(n) local Q,k,N,z; Q:=[n]; for k from 1 do N:=convert(Q[k],base,10); z:=sum(N['i']^2,'i'=1..nops(N)); if not member(z,Q) then Q:=[op(Q),z]; else Q:=[op(Q),z]; break; fi; od; return Q; end: %p A193566 a:=[]: for i from 1 while nops(a)<30 do Q:=S(i); A:=Q[nops(Q)]; if A=16 then a:=[op(a),i] fi; od: print(op(a)); %Y A193566 Cf. A031177, A039943. %K A193566 nonn,base %O A193566 1,1 %A A193566 _Martin Renner_, Jul 31 2011