[go: up one dir, main page]

login
A254596
Convert number n to each of the bases from 2 to 10. a(n) is the minimum base that maximizes the sum of digits.
3
2, 3, 4, 5, 6, 7, 8, 9, 10, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 7, 8, 8, 8, 5, 9, 9, 7, 10, 10, 8, 8, 7, 7, 7, 9, 10, 10, 10, 10, 7, 7, 9, 9, 9, 8, 8, 8, 7, 10, 9, 9, 9, 9, 8, 8, 10, 10, 10, 10, 9, 9, 9, 8, 10, 10, 10, 10, 10, 10, 9, 9, 10, 10, 10, 10, 10, 10, 10
OFFSET
1,1
COMMENTS
For n <= 10^6 the frequencies are:
2 -> 1 (highest number: 1)
3 -> 1 (highest number: 2)
4 -> 7 (highest number: 832123)
5 -> 8607 (highest number: 993124)
6 -> 29338 (highest number: 995105)
7 -> 110167 (highest number: 991612)
8 -> 153583 (highest number: 999423)
9 -> 251998 (highest number: 1000000)
10 -> 446298 (highest number: 999999)
2 only occurs at a(1) and 3 only occurs at a(2), but all the other numbers, 4 through 10, occur with increasing frequency. 4 occurs at n: 3, 730, 731, 631530, 631531, 832122, 832123, ..., . - Robert G. Wilson v, Feb 05 2015
From Robert G. Wilson v, Feb 11 2015: (Start)
The following table is a count of the frequencies of the bases, b, 2 through 10, and for exponents, e, 1 through 9, of 10:
\b..2..3...4........5.........6.........7..........8..........9.........10
e\
1 1 1 1 1 2 1 1 1 1
2 1 1 1 2 4 15 14 19 43
3 1 1 3 19 61 127 171 233 384
4 1 1 3 161 419 1152 1525 2445 4293
5 1 1 3 1168 3706 12152 16503 24138 42328
6 1 1 7 8607 29338 110167 153583 251998 446298
7 1 1 7 66461 313656 918927 1559502 2616635 4524810
8 1 1 11 421478 2262670 8075616 16460917 25832934 46946372
9 1 1 26 3910736 19645806 77440365 167615009 254855326 476532730
(End)
LINKS
EXAMPLE
11 in base 2 is 1011 -> sum of digits: 3;
11 in base 3 is 102 -> sum of digits: 3;
11 in base 4 is 23 -> sum of digits: 5;
11 in base 5 is 21 -> sum of digits: 3;
11 in base 6 is 15 -> sum of digits: 6;
11 in base 7 is 14 -> sum of digits: 5;
11 in base 8 is 13 -> sum of digits: 4;
11 in base 9 is 12 -> sum of digits: 3;
11 in base 10 is 11 -> sum of digits: 2.
Therefore a(11) = 6.
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; print(d); od; end: P(10^4);
MATHEMATICA
f[n_] := Block[{a = Plus @@@ IntegerDigits[ n, {2, 3, 4, 5, 6, 7, 8, 9, 10}]}, 1 + Position[a, Max@ a][[1, 1]]]; Array[f, 79] (* Robert G. Wilson v, Feb 04 2015 *)
CROSSREFS
Cf. A254597.
Sequence in context: A365392 A305810 A171060 * A373230 A286603 A374485
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Feb 02 2015
STATUS
approved