[go: up one dir, main page]

login
Values of n for which A254596(n) = 4.
1

%I #11 Feb 27 2015 22:59:28

%S 3,730,731,631530,631531,832122,832123,15250123,53223051,53263050,

%T 53263051,154121931,174700251,191805131,200061659,430750411,455521003,

%U 456042200,456042201,456042202,456042203,456043210,456043211,456110811,460301002,460301003

%N Values of n for which A254596(n) = 4.

%C 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.

%H Paolo P. Lava and Robert G. Wilson v, <a href="/A255012/b255012.txt">Table of n, a(n) for n = 1..55</a>

%e 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.

%p with(numtheory): P:=proc(q) local a, b, c, d, j, k, n; for n from 1 to q do c:=0;

%p 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;

%p fi; od; if d=4 then print(n); fi; od; end: P(10^10); # _Paolo P. Lava_, Feb 13 2015

%t 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

%Y Cf. A254596.

%K nonn,base

%O 1,1

%A _Paolo P. Lava_ and _Robert G. Wilson v_, Feb 12 2015