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 A104166 #16 Mar 14 2025 09:52:36 %S A104166 4,22,666,1111,6666666,4444444444,44444444444444444444, %T A104166 555555555555555555555555555,55555555555555555555555555555555, %U A104166 4444444444444444444444444444444444444444444444444444444 %N A104166 Repdigit Smith numbers. %H A104166 Shyam Sunder Gupta, <a href="http://www.shyamsundergupta.com/smith.htm">Smith Numbers</a>. %H A104166 Shyam Sunder Gupta, <a href="https://doi.org/10.1007/978-981-97-2465-9_4">Smith Numbers</a>, Exploring the Beauty of Fascinating Numbers, Springer (2025) Ch. 4, 127-157. %t A104166 d[n_]:=IntegerDigits[n]; tr[n_]:=Transpose[FactorInteger[n]]; a[n_]:=NestList[FromDigits[Flatten[d[{#,n}]]]&,n,55]; t={}; Do[If[!PrimeQ[n]&&Total[d[n]]==Total[d@tr[n][[1]]*tr[n][[2]],2],AppendTo[t,n]],{n,Drop[Union[Flatten[Table[a[k],{k,9}]]],1]}]; t (* _Jayanta Basu_, Jun 04 2013 *) %o A104166 (Python) %o A104166 from sympy import factorint %o A104166 from itertools import product %o A104166 def sd(n): return sum(map(int, str(n))) %o A104166 def smith(n): %o A104166 f = factorint(n) %o A104166 return sum(f[p] for p in f) > 1 and sd(n) == sum(sd(p)*f[p] for p in f) %o A104166 def repsto(limit): %o A104166 yield from range(min(limit, 9)+1) %o A104166 for rep in range(2, 10**len(str(limit))): %o A104166 for digit in "123456789": %o A104166 out = int(digit*rep) %o A104166 if out > limit: return %o A104166 yield out %o A104166 print(list(filter(smith, repsto(10**32)))) # _Michael S. Branicky_, Apr 22 2021 %Y A104166 Cf. A006753. %Y A104166 Subsequence of both A098834 and A104171. %K A104166 base,nonn %O A104166 1,1 %A A104166 _Shyam Sunder Gupta_, Mar 10 2005