OFFSET
1,1
COMMENTS
EXAMPLE
a(1) = 4 since it is the least composite number and it is not a Smith number in any base 1 < b <= 4.
a(2) = 10 since it is the least number that is a Smith number in any base 1 < b <= 10: 10 = 2 * 5 is, 22_4 = 2_4 * 11_4 in base 4, and 2 + 2 = 2 + (1 + 1) = 4.
MATHEMATICA
digSum[n_, b_] := Plus @@ IntegerDigits[n, b]; smithCount[n_] := If[! CompositeQ[n], 0, Module[{c = 0, f = FactorInteger[n]}, p = f[[;; , 1]]; e = f[[;; , 2]]; Do[If[Total[e*(digSum[#, b] & /@ p)] == digSum[n, b], c++], {b, 2, n}]; c]]; seq = {}; cmax = -1; Do[If[CompositeQ[n] && (c = smithCount[n]) > cmax, cmax = c; AppendTo[seq, n]], {n, 1, 666}]; seq
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Aug 21 2020
STATUS
approved