OFFSET
1,1
COMMENTS
Convert number, n, to the bases, b, 2 through 10. Find the minimum base, b, that yields the greatest sum of the digits. This sequence lists numbers for which that base is 4.
LINKS
Paolo P. Lava and Robert G. Wilson v, Table of n, a(n) for n = 1..55
EXAMPLE
1011011011_2 = 1000002_3 = 23123_4 = 10411_5 = 3215_6 = 2063_7 = 1333_8 = 1002_9 = 731_10 and their respective sum of the digits is 7, 3, 11, 7, 11, 11, 10, 3, 11. Since the maximum sum of the digits is 11 which first occurs for base 4; 731 is in the sequence.
MAPLE
with(numtheory): P:=proc(q) local a, b, c, d, j, k, n; for n from 1 to q do c:=0;
for k from 2 to 10 do a:=convert(n, base, k); b:=add(a[j], j=1..nops(a)); if b>c then c:=b; d:=k;
fi; od; if d=4 then print(n); fi; od; end: P(10^10); # Paolo P. Lava, Feb 13 2015
MATHEMATICA
f[n_] := Block[{a = Plus @@@ IntegerDigits[n, {2, 3, 4, 5, 6, 7, 8, 9, 10}]}, 1 + Position[a, Max@ a][[1, 1]]]; k = 1; lst = {}; While[k < 2550000001, If[ f@ k == 4, AppendTo[lst, k]]; k++]; lst
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava and Robert G. Wilson v, Feb 12 2015
STATUS
approved