cp's OEIS Frontend

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.

A104166 Repdigit Smith numbers.

Original entry on oeis.org

4, 22, 666, 1111, 6666666, 4444444444, 44444444444444444444, 555555555555555555555555555, 55555555555555555555555555555555, 4444444444444444444444444444444444444444444444444444444
Offset: 1

Views

Author

Shyam Sunder Gupta, Mar 10 2005

Keywords

Crossrefs

Cf. A006753.
Subsequence of both A098834 and A104171.

Programs

  • Mathematica
    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 *)
  • Python
    from sympy import factorint
    from itertools import product
    def sd(n): return sum(map(int, str(n)))
    def smith(n):
      f = factorint(n)
      return sum(f[p] for p in f) > 1 and sd(n) == sum(sd(p)*f[p] for p in f)
    def repsto(limit):
      yield from range(min(limit, 9)+1)
      for rep in range(2, 10**len(str(limit))):
        for digit in "123456789":
          out = int(digit*rep)
          if out > limit: return
          yield out
    print(list(filter(smith, repsto(10**32)))) # Michael S. Branicky, Apr 22 2021