|
|
A309969
|
|
a(n) is the least base b in the range 2..n where the product of the digits of n is maximized.
|
|
2
|
|
|
2, 2, 3, 3, 4, 4, 3, 5, 4, 4, 7, 5, 5, 4, 6, 6, 5, 5, 7, 8, 6, 6, 5, 9, 9, 7, 6, 6, 8, 8, 11, 7, 7, 6, 13, 13, 8, 8, 7, 7, 11, 11, 9, 12, 8, 8, 7, 10, 13, 13, 9, 9, 11, 8, 19, 12, 10, 10, 9, 9, 9, 8, 13, 11, 17, 17, 10, 10, 12, 9, 15, 15, 15, 11, 11, 13, 10
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,1
|
|
LINKS
|
|
|
EXAMPLE
|
For n = 8:
- the digits of 8 in bases b = 2..8 and the corresponding products are:
b digits product
- ------ -------
2 "1000" 0
3 "22" 4
4 "20" 0
5 "13" 3
6 "12" 2
7 "11" 1
8 "10" 0
- the product is maximized in base b = 3,
- hence a(8) = 3.
|
|
PROG
|
(PARI) a(n) = my (v, m=-1); for (b=2, n, my (p=vecprod(digits(n, b))); if (m<p, m=p; v=b)); v
|
|
CROSSREFS
|
See A309965 for the corresponding product of digits.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|