OFFSET
2,1
LINKS
Rémy Sigrist, Table of n, a(n) for n = 2..10000
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
KEYWORD
AUTHOR
Rémy Sigrist, Aug 25 2019
STATUS
approved