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 A383328 #23 May 13 2025 08:26:32 %S A383328 0,1,155,224,242,334,343,422,433,505,515,550,551,1388,1788,1838,1878, %T A383328 1883,1887,3188,3334,3336,3343,3363,3433,3633,3818,3881,4333,5005, %U A383328 5050,5500,6333,7188,7818,7881,8138,8178,8183,8187,8318,8381,8718,8781,8813,8817,8831 %N A383328 Numbers that have the same set of digits as the sum of the squares of their digits. %e A383328 155 and 1^2 + 5^2 + 5^2 = 51 have the same set of digits {1,5}, so 155 is a term. %t A383328 q[k_] := Module[{d = IntegerDigits[k]}, Union[d] == Union[IntegerDigits[Total[d^2]]]]; Select[Range[0, 10000], q] (* _Amiram Eldar_, Apr 23 2025 *) %o A383328 (Python) %o A383328 def ok(n): return set(s:=str(n)) == set(str(sum(int(d)**2 for d in s))) %o A383328 print([k for k in range(10**4) if ok(k)]) # _Michael S. Branicky_, Apr 23 2025 %o A383328 (PARI) isok(k) = my(d=digits(k)); Set(d) == Set(digits(sum(i=1, #d, d[i]^2))); \\ _Michel Marcus_, May 13 2025 %Y A383328 Cf. A003132, A029793, A249515. %K A383328 nonn,base %O A383328 1,3 %A A383328 _Jean-Marc Rebert_, Apr 23 2025