login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A104166 Repdigit Smith numbers. 2
4, 22, 666, 1111, 6666666, 4444444444, 44444444444444444444, 555555555555555555555555555, 55555555555555555555555555555555, 4444444444444444444444444444444444444444444444444444444 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
S. S. Gupta, Smith Numbers.
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 *)
PROG
(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
CROSSREFS
Cf. A006753.
Subsequence of both A098834 and A104171.
Sequence in context: A145504 A321604 A276124 * A362823 A368140 A273054
KEYWORD
base,nonn
AUTHOR
Shyam Sunder Gupta, Mar 10 2005
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)