login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A375724
a(n) is the first Smith number with at least n digits.
0
4, 22, 121, 1086, 10086, 100066, 1000165, 10000426, 100000165, 1000000165, 10000000165, 100000000498, 1000000000066, 10000000000615, 100000000000786, 1000000000000426, 10000000000000246, 100000000000000642, 1000000000000000462, 10000000000000000246, 100000000000000000282, 1000000000000000000966
OFFSET
1,1
COMMENTS
a(n) is the least composite k >= 10^(n-1) such that the sum of the decimal digits of k is equal to the sum of the decimal digits of the prime factors of k, counted with multiplicity.
Almost certainly a(n) has exactly n digits, but "at least" is included in the Name since we have no proof of that.
EXAMPLE
a(5) = 10086 because 10086 has digit-sum 15 and 10086 = 2 * 3 * 41^2 with 2 + 3 + (4 + 1) + (4 + 1) = 15, and no k from 10000 to 10085 works.
MAPLE
f:= proc(n) local t, x;
for x from 10^(n-1) do
if isprime(x) then next fi;
if convert(convert(x, base, 10), `+`) = add(t[2]*convert(convert(t[1], base, 10), `+`), t = ifactors(x)[2]) then return x fi;
od
end proc:
map(f, [$1..30]);
PROG
(Python)
from sympy import factorint
from itertools import count
def sd(n): return sum(map(int, str(n)))
def is_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 a(n): return next(k for k in count(10**(n-1)) if is_smith(k))
print([a(n) for n in range(1, 23)]) # Michael S. Branicky, Aug 25 2024
CROSSREFS
Cf. A006753.
Sequence in context: A098834 A065983 A236576 * A185858 A180034 A260346
KEYWORD
nonn,base
AUTHOR
Robert Israel, Aug 25 2024
STATUS
approved